Binary Search
How binary search works and why it is important algorithm
Introduction
Binary search is a fundamental technique used to efficiently find an element or an optimal value when the answer behaves ``monotonically''.
Naive solution
Suppose we have a sorted array and we want to find the position of a value , i.e. such an index that .