Selecting x cards from set is same as removing all cards other than x present in set.
For that, you might give a look at my two pointer solution.
Selecting x cards from set is same as removing all cards other than x present in set.
For that, you might give a look at my two pointer solution.