Binary Search

  • Binary Search is a search algorithm that efficently finds the position of the target value in a sorted array (Must be sorted!!)
  • It works by repeatedly dividing the search interval in half until the target value is found or determined to be not present
  • Time complexity is O(log n), where n is the number of elements in the array
  • This makes binary search very efficient for large datasets

Resources

Concepts explained here are following those from Neetcode’s roadmap

.


Written By

GitHub Contributor Team