13 ms·
The idea is that I don't need to pair my socks. I can just take any random 2 socks from the heap whenever I'm going out, since they are all the same. Hence, O(1
by yen223 13y ago
The idea is that I don't need to pair my socks. I can just take any random 2 socks from the heap whenever I'm going out, since they are all the same. Hence, O(1).