Smartcare Interview Question

use a binary search to test whether an element is in a sorted array

Interview Answer

Anonymous

Jul 16, 2012

using binary search will not give this result because input should be in sorted list of element for proper use of this binary search algorithm... you go through the algorithm , i am sure you will get answer of this.... for better understanding purposes, take 1 example and trace it 4 sorted as well as 4 unsorted array....