Meta Interview Question

Write binary search?

Interview Answer

Anonymous

Oct 20, 2010

Simple question. I wrote decent code in about 10-15 minutes. The interviewer tried to trick me by providing an unsorted array. I had already mentioned verbally that I am assuming the array is sorted. Anyway after his unsorted input I added a check to see if the array was sorted.