Binary Search

Binary search is a search algorithm for finding a target in a sorted array.

Binary search is a representative logarithmic time algorithm with a time complexity of O(logn)O(logn) for finding values, and it has many similarities with the Binary Search Tree (BST).

While the Binary Search Tree is a 'data structure' that stores and searches a sorted structure, binary search refers to the 'algorithm' itself that finds values in a sorted array.

Last updated