[Solved] Find the intersection between sublists
Here is a more efficient algorithm: For each unique number that is present in at least one of the sublists, let’s maintain a list of indices of all sublists that contain this number. This part is O(n * log n) time if we use sorting to find unique numbers or O(n) if we use a … Read more