We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
From what I understand looking at the examples, it seems like the person who wrote the statement doesn't know what a subset is. When he says "all subsets of S", you should read "all elements in S".
So if S={1,2,4} the 'subsets' are 1, 2 and 4, instead of {1}, {2}, {4}, {1,2}, {1,4}, {2,4} and {1,2,4}.
Left Rotation
You are viewing a single comment's thread. Return to all comments →
From what I understand looking at the examples, it seems like the person who wrote the statement doesn't know what a subset is. When he says "all subsets of S", you should read "all elements in S".
So if S={1,2,4} the 'subsets' are 1, 2 and 4, instead of {1}, {2}, {4}, {1,2}, {1,4}, {2,4} and {1,2,4}.
Edit: I can now confirm that I was wrong, the problem is indeed about subsets. As long as you ignore any mention of 'U' in the problem statement you should be fine. Refer to gdisastery answer here: https://www.hackerrank.com/contests/w22/challenges/submask-queries-/forum/comments/168407