Big O Notation Flashcards
linear search best case time complexity
O(1)
linear search average case time complexity
O(n)
linear search worst case time complexity
O(n)
Binary search array best case time complexity
O(1)
Binary search array average case time complexity
O(log n)
Binary search array worst case time complexity
O(log n)
Binary search tree best case time complexity
O(1)
Binary search tree average case time complexity
O(log n)
Binary search tree worst case time complexity
O(n)
Hashing best case time complexity
O(1)
Hashing average case time complexity
O(1)
Hashing worst case time complexity
O(n)
Breadth/depth-first of graph best case time complexity
O(1)
Breadth/depth-first of graph average case time complexity
O(V+E)
Breadth/depth-first of graph worst case time complexity
O(V^2)