Leetcode 1452: People Whose List of Favorite Companies Is Not a Subset of Another List

In this Leetcode problem, we are given a list of (distinct) sets and we should return the indices (sorted) for which the sets are not subsets of other sets in the list.

Problem statement

Before giving the whole solution, let’s talk about the main ideas to solve the problem: