Binary search time complexity
partition time complexity
O (n) = O (n) + O (n / 2) + O (n / 4) + ....
Then geometric summation formula obtained is O (2n), i.e., O (n)
Binary search time complexity
partition time complexity
O (n) = O (n) + O (n / 2) + O (n / 4) + ....
Then geometric summation formula obtained is O (2n), i.e., O (n)