Give the best-case time complexity of binary search in both successful search and unsuccessful search. code example
Example: binary search time complexity
Average case:O(log n)
Best case:O(1)
Average case:O(log n)
Best case:O(1)