GUVI
Analysis of Complexity
Constant time O(1)
Finding the kth largest element in a sorted list.
Sublinear time O(log n)
Finding an element in a sorted list
Linear time O(n)
Finding the largest element in an an unsorted list
SuperLinear time O(n log n)
Sorting, Merging
Polynomial time O(n^k)
Sorting(n^2), Matrix multiplication (n^3)
Exponential time O(kⁿ)
Knapsack,Subset sum
Factorial time O(n!)
Traveling salesperson
Trees
Height of the tree
Traversal
- PreOrder
- InOrder
- PostOrder