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 hintsTopics
Also asked at 2 companies
More Roblox Questions
Task SchedulerMediumText JustificationHardMaximize Distance to Closest PersonMediumRotate ImageMediumMagnetic Force Between Two BallsMedium
View all Roblox questions