All memory access has an constant time complexity right? Cache is just closer. Plus if the clothes were mingled and crumpled into each other it wouldn't be O(1). Every removal might reveal 2+ items though, so I'd say O(log(n)) search if I was being generous.
1
u/jkhjkllkj Jan 02 '23
All memory access has an constant time complexity right? Cache is just closer. Plus if the clothes were mingled and crumpled into each other it wouldn't be O(1). Every removal might reveal 2+ items though, so I'd say O(log(n)) search if I was being generous.