<<< Binary Search Implementation | Index | Basic methods of a class that implements a generic queue >>> |
In general, if list is a sorted list of size n, to determine whether an element is present in the list, the binary search makes at most
2log2n + 2
key (item) comparisons
<<< Binary Search Implementation | Index | Basic methods of a class that implements a generic queue >>> |