Binary Search Best
Θ(1)
Binary Search Average
Θ(logn)
Binary Search Worst
Θ(logn)
Binary Search Space
O(1)
Binary Search Operation
Comparison (S[m]==key)
Binary Search Notes
Requires data to be sorted and kept in RAM for random access.
Hoare’s (QuickSelect) Best
Θ(n)
Hoare’s (QuickSelect) Average
Θ(n)
Hoare’s (QuickSelect) Worst
O(n2)
Hoare’s (QuickSelect) Space
O(1)
Hoare’s (QuickSelect) Operation
Comparing elements during Partition
Hoare’s (QuickSelect) Notes
Finds the k-th positional statistic; much faster than repeated minimum search.
Selection Sort Best
Θ(n2)
Selection Sort Average
Θ(n2)
Selection Sort Worst
Θ(n2)
Selection Sort Space
O(1)
Selection Sort Operation
Comparing two elements in an array
Selection Sort Notes
Fixed number of operations regardless of initial data order.
Insertion Sort Best
Θ(n)
Insertion Sort Average
Θ(n2)
Insertion Sort Worst
Θ(n2)
Insertion Sort Space
O(1)
Insertion Sort Operation
Comparing elements to find insertion point