Hacker News new | past | comments | ask | show | jobs | submit login

This would be O(n), since the time it takes to pair your socks is still proportional to the number of socks you have



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).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: