1.

Explain How Binary Search Works?

Answer»

In binary search, we compare the key with the item in the MIDDLE position of the array. If the key is less than the item searched then it MUST lie in the lower half of the array, if the key is GREATER than the item searched than it should be in UPPER half of the array.

In binary search, we compare the key with the item in the middle position of the array. If the key is less than the item searched then it must lie in the lower half of the array, if the key is greater than the item searched than it should be in upper half of the array.



Discussion

No Comment Found