Problem Link: Your text to link here...
Solution Link: Your text to link here...
Here, Instead of following bitmasks method, I used itertools.combinations() module of Python and got accepted. Can someone please help to find its space and time complexity in worst case scenario? Thank you...