Binary search compares the midpoint of a sorted collection and eliminates half of the
remaining values after each comparison. Its time complexity is
O(log N).
Loading bar chart…
Binary search traversal showing 15 bars for value.
Values: index 0: 6.0, index 1: 10.0, index 2: 21.0, index 3: 24.0, index 4: 27.0, index 5: 32.0, index 6: 49.0, index 7: 59.0, index 8: 64.0, index 9: 72.0, index 10: 80.0, index 11: 83.0, index 12: 85.0, index 13: 88.0, and index 14: 98.0.