Algorithms Overview¶
Master the algorithms that power efficient software.
What You'll Learn¶
Understanding algorithms is essential for writing efficient code and passing technical interviews.
Topics¶
| Topic | Description | Difficulty |
|---|---|---|
| Searching | Find elements efficiently | Easy |
| Sorting | Order elements | Medium |
| Recursion | Self-referential functions | Medium |
| Dynamic Programming | Optimize overlapping subproblems | Hard |
| Graph Algorithms | Network operations | Medium |
Big-O Quick Reference¶
| Complexity | Name | Example |
|---|---|---|
| O(1) | Constant | Array access |
| O(log n) | Logarithmic | Binary search |
| O(n) | Linear | Linear search |
| O(n log n) | Linearithmic | Merge sort |
| O(n²) | Quadratic | Bubble sort |
| O(2ⁿ) | Exponential | Recursive Fibonacci |
Learning Path¶
- Searching - Binary search and variants
- Sorting - Comparison and non-comparison sorts
- Recursion - Base cases and recursive calls
- Dynamic Programming - Memoization and tabulation
- Graph Algorithms - BFS, DFS, shortest path
Practice Files¶
All implementations are in build/algorithms/:
# Searching
python build/algorithms/01-searching/binary_search.py
# Sorting
python build/algorithms/02-sorting/merge_sort.py
# Dynamic Programming
python build/algorithms/04-dynamic-programming/fibonacci.py
Interview Tips¶
- Know time/space complexity
- Understand trade-offs
- Practice implementing from scratch
- Be able to explain your approach