3 ms·
That's a really good point, thanks taeric. Anything less than O(n) obviously means not needing to look at every element of the input, i.e. it's already sorted
by AgentIcarus 12y ago
That's a really good point, thanks taeric.
Anything less than O(n) obviously means not needing to look at every element of the input, i.e. it's already sorted or similar. For most other interview problems that seems like a reasonable lower bound in the absence of more detailed analysis. I guess the recruiter's advice to go practice on TopCoder wasn't just copy-paste.