Imagine you're analyzing employee preferences in a corporate survey! You have collected data about each person's favorite companies, and now you need to find the unique individuals whose preferences aren't completely covered by someone else's broader list.
Given an array favoriteCompanies where favoriteCompanies[i] represents the list of favorite companies for the i-th person (0-indexed), your task is to identify people whose company preferences are not a subset of any other person's list.
Goal: Return the indices of people whose favorite companies list is NOT completely contained within anyone else's list. The result should be in increasing order.
Example: If Person A likes ["Google", "Apple"] and Person B likes ["Google", "Apple", "Microsoft"], then Person A's preferences are a subset of Person B's, so we wouldn't include Person A in our result.
Input & Output
Constraints
- 1 ≤ favoriteCompanies.length ≤ 100
- 1 ≤ favoriteCompanies[i].length ≤ 500
- 1 ≤ favoriteCompanies[i][j].length ≤ 20
- All strings in favoriteCompanies[i] are distinct
- All the strings of favoriteCompanies are distinct