Hamster
Resident Rodent
- Joined
- Aug 22, 2006
- Messages
- 45,920
- Reaction score
- 18,416
That one can be solved in log(n) time.
Well I'm sure if somebody plonks that solution on the board the follow up question is going to be "but what if I have a list of 3 million items" and then you'd have to go do some more clever stuff like checking the value of the middle (pivot) etc. I'm sure you have an even better way
I was really just passing through the thread and responded without thinking it through. I hate these type of questions anyway.