4 ms·
It's the recursion (or parameters to functions in recursion that kills most candidates). It's pretty intuitive in the head. But I agree, plain vanilla binary s
by NTDF9 9y ago
It's the recursion (or parameters to functions in recursion that kills most candidates). It's pretty intuitive in the head.
But I agree, plain vanilla binary search is easy.
- adrianN 9y agoPeople are free to implement an iterative version.