Skip to content

Files

Latest commit

1e55cbd · Mar 3, 2024

History

History

BinarySearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 3, 2024
Feb 16, 2024

Binary Search

Reference: https://takeuforward.org/data-structure/binary-search-explained/

  • Binary search is only applicable in a sorted search space. The sorted search space does not necessarily have to be a sorted array. It can be anything but the search space must be sorted.
  • In binary search, we generally divide the search space into two equal halves and then try to locate which half contains the target. According to that, we shrink the search space size.