Algorithms Explained
yourbasic.org/algorithms
Code should be correct, clear and efficient.
Prefer simple. Avoid clever.
Free AI guide for everyone
Algorithms
- Algorithms: What’s the problem?
- LLMs: Algorithms that break the rules
- Introduction to graph algorithms: definitions and examples
- Dynamic programming [step-by-step example]
- Las Vegas vs. Monte Carlo algorithms
- Blackjack card counting risk analysis: poor gains at huge risk
- What’s a seed in a random number generator?
- Generate all permutations
Data structures
Sorting
- O(n log log n) time integer sorting
- Quicksort optimizations explained [complete code]
- Insertion sort vs. selection sort (time complexity and performance)
- Radix sorting basics
Correctness
- Loop invariants can give you coding superpowers
- On induction and recursive functions, with an application to binary search
Analysis
- How to analyze time complexity: Count your steps
- Big O notation: definition and examples
- The quadratic wall: Why LLM context windows are expensive
- Time complexity of recursive functions [Master theorem]
- Unit cost vs. bit cost in time complexity
- Amortized time complexity

