Extra Flashcards
1
Q
Best, Average, worst time complexty
Quicksort
Mergesort
Bubble sort
A
Omega(nlogn), Theta(nlogn), O(n^2)
Omega(nlogn), theta(nlogn), O(nlogn)
Omega(n), theta(n^2), O(n^2)
2
Q
Best, Average, worst time complexty
Insertion sort
Selection sort
Binary
A
Omega(n), theta(n^2),O(n^2)
Omega(n^2), theta(n^2), O(n^2)
Omega(logn), theta(logn), O(n)
3
Q
Order from best to worst time complexity:
A
1, logn, n, nlogn, n^2,2^n,n!
4
Q
Theta for:
Array
List
Binary
Hash
A
All n except for
Add()=1
get()=1
All n except for
Add() =1
Remove() =1
All logn
All constants