Problem Link: B. Petr and a Combination Lock
Solution Link: Click 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...
I don't know much about python, but to me it looks like combinations was used to make all possible bitmasks of size N to determine which rotation is clockwise and which counterclockwise. Complexity of the solution is $$$O(2^N N).$$$