1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
what is big o notation?
measures how no. of steps & memory usage change as the amount of data being processed increases
best case for linear search
o(1)
average case for linear search
o(n)
worst case for linear search
o(n)
best case for binary search array
o(1)
average case for binary search array
o(log n)
worst case for binary search array
o(log n)
best case for binary search tree
o(1)
average case for binary search tree
o(log n)
worst case for binary search tree
o(n)
best case for hashing
o(1)
average case for hashing
o(1)
worst case for hashing
o(n)
best case for breadth/depth first search
o(1)
average case for breadth/depth first search
o(V+E)
no. of vertices + edges
worst case for breadth/depth first search
o(V^2)
best case for bubble sort
o(n)
average case for bubble sort
o(n^2)
worst case for bubble sort
o(n^2)
space complexity of bubble sort
o(1)
best case for insertion sort
o(n)
average case for insertion sort
o(n^2)
worst case for insertion sort
o(n^2)
space complexity of insertion sort
o(1)
best case for merge sort
o(n log n)
average case for merge sort
o(n log n)
worst case for merge sort
o(n log n)
space complexity for merge sort
o(n)
best case for quick sort
o(n log n)
average case for quick sort
o(n log n)
worst case for quick sort
o(n^2)
space complexity for quick sort
o(log n)
o(1)
o(log n)
o(n)
o(n log n)
o(n^2)
o(2^n)