Big O Notation
Big-O notation is an upper bound on the complexity of an equation or system of equations that is founded in number and complexity theory in mathematics. It was borrowed by computer scientists to describe the solution spaces of algorithms and is used do denote the theoretical ‘worst case’ for time and space complexity of algorithms.
Tips for computing Big-O
- Include all things that affect the time and space complexity.
- Use logical variable names.
- Define the variables you need.
- Add tandem calculations and multiply cyclical ones.
- Drop constants
- Use Big-O to describe space complexity (memory allocations or stack frames)
- Drop lower order polynomials (non-dominate terms)