Bloomberg Interview Question

Now if you have a sorted array, how will you search for an element?

Interview Answers

Anonymous

Feb 24, 2011

Algo of binary search

Anonymous

Mar 15, 2011

We can use binary search, it takes O(log n) time.

Anonymous

Mar 15, 2011

True. He then asked me to write a function for binary search.