How can we help?

You can also find more resources in our Help Center.

18 terms

Sorting and Searching Performances

This is for the AB AP Computer Science test, which asks the performance measures of various sorting and searching algorithms. Consider all definitions to be wrapped in O(). + is best case, - is worst case, ~ is average.
STUDY
PLAY
1
+Sequential Search
n
-Sequential Search
n
~Sequential Search
1
+Binary Search
log n
-Binary Search
log n
~Binary Search
n^2
All Selection Sort
n
+Insertion Sort
n^2
-Insertion Sort
n^2
~Insertion Sort
n log n
All Merge Sort
n log n
+Quick Sort
n^2
-Quick Sort
1
+Hashtable (search)
1
~Hashtable
n
-Hashtable
n log n
All Heapsort
n log n
~Quick Sort