computer-science-algorithms
- "Trying To Build A Program Without Understanding The Algorithm Is Like Trying To Build A Car Without Understanding Engines."
Algorithm
Algorithm Characteristics
- Complexity
1. Space Complexity: How much memory does it require?
2. Time Complexity: How much time does it take to complete?
- Inputs and Output
- Classification
1. Serial/Parallel, Exact/Approximate, Deterministic/Non-deterministic
Common Algorithms
- Search
- Sorting
- Computational
- Collection
Understanding Algorithm Performance
- Big-O notation
Common Big-O Terms
Notation | Description |
---|---|
O(1) | Constant Time |
O(log n) | Logarithmic |
O(n) | Linear Time |
O(n log n) | Log-linear |
O(n2) | Quadratic |