Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 247 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 247 Bytes

"# Binary_Search"

while (low <= high) { int mid = low + (high - low) / 2;

if (array[mid] == x)
  return mid;

if (array[mid] < x)
  low = mid + 1;

else
  high = mid - 1;

}

return -1; }