Number of Ways to Wear Different Hats to Each Other at Roblox

Hard45.7% acceptance

This problem has 87.5% frequency at Roblox.

Problem Description

There are `n` people and `40` types of hats labeled from `1` to `40`. Given a 2D integer array `hats`, where `hats[i]` is a list of all hats preferred by the `ith` person. Return the number of ways that `n` people can wear **different** hats from each other. Since the answer may be too large, ret...

Read full problem and hints

Topics

Also asked at 2 companies


More Roblox Questions

View all Roblox questions