1452. People Whose List of Favorite Companies Is Not a Subset of Another List
https://leetcode.com/problems/people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list
Description
Given the array favoriteCompanies
where favoriteCompanies[i]
is the list of favorites companies for the ith
person (indexed from 0).
Return the indices of people whose list of favorite companies is not a subset of any other list of favorites companies. You must return the indices in increasing order.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= favoriteCompanies.length <= 100
1 <= favoriteCompanies[i].length <= 500
1 <= favoriteCompanies[i][j].length <= 20
All strings in
favoriteCompanies[i]
are distinct.All lists of favorite companies are distinct, that is, If we sort alphabetically each list then
favoriteCompanies[i] != favoriteCompanies[j].
All strings consist of lowercase English letters only.
ac
Last updated