⚙️ Algorithms
Sorting, graphs, DP and beyond. 51 topics, from beginner to advanced.
Algorithms are step-by-step procedures for solving problems. This area covers searching and sorting, graph traversal, shortest paths, greedy methods, divide and conquer, dynamic programming and complexity analysis with Big-O notation. Learning them gives you a toolkit for choosing an approach and predicting how it will scale.
Who this area is for
Students preparing for technical interviews, developers who need faster solutions, and anyone who wants to reason about why one approach beats another.
Real-world use cases
- Finding the shortest route on a map with Dijkstra’s algorithm.
- Sorting search results or records by a chosen key.
- Detecting cycles in a dependency graph before a build runs.
- Finding the shortest route between two locations in a navigation app.
- Splitting a large dataset into chunks that can be sorted in parallel.
Topics in Algorithms
Beginner (17)
- Algorithm Basics — Finite step-by-step procedures solving a well-defined problem.
- Pseudocode — Language-neutral notation for describing algorithms.
- Time Complexity — How running time grows with input size.
- Space Complexity — How memory use grows with input size.
- Big-O Notation — Asymptotic upper bound describing worst-case growth.
- Linear Search — Scanning elements one by one until a match is found.
- Binary Search — Halving a sorted range repeatedly to locate a target.
- Bubble Sort — Repeatedly swapping adjacent out-of-order pairs.
- Selection Sort — Repeatedly selecting the minimum from the unsorted part.
- Insertion Sort — Growing a sorted prefix by inserting each next element.
- Merge Sort — Divide-and-conquer sort that splits and merges halves.
- Quick Sort — Partitioning around a pivot then sorting each side.
- Counting Sort — Non-comparison sort tallying occurrences of small integer keys.
- Radix Sort — Sorting digit by digit using a stable subroutine.
- Brute Force — Trying every candidate solution exhaustively.
- Two Pointers — Technique moving two indices through data to cut nested loops.
- Sliding Window — Maintaining a moving range to solve subarray problems in linear time.
Intermediate (17)
- Heap Sort — Sorting by repeatedly extracting the maximum from a heap.
- Shell Sort — Insertion sort over shrinking gaps.
- Bucket Sort — Distributing values into ranges then sorting each bucket.
- Timsort — Hybrid of merge and insertion sort exploiting existing runs.
- Divide and Conquer — Splitting a problem into subproblems solved independently then combined.
- Master Theorem — Formula solving recurrences of divide-and-conquer algorithms.
- Greedy Algorithms — Making the locally best choice at every step.
- Dynamic Programming — Solving overlapping subproblems once and storing results.
- Knapsack Problem — Choosing items under a capacity to maximize value.
- Longest Common Subsequence — Finding the longest shared ordered subsequence of two sequences.
- Edit Distance — Minimum insertions, deletions and substitutions turning one string into another.
- Backtracking — Building solutions incrementally and abandoning dead ends.
- N-Queens Problem — Placing queens on a board so none attack each other.
- Breadth-First Search — Exploring a graph level by level using a queue.
- Depth-First Search — Exploring a graph as deep as possible before backtracking.
- Topological Sort — Linear ordering of a DAG respecting dependencies.
- Dijkstra's Algorithm — Shortest paths from a source with non-negative weights.
Advanced (17)
- Bellman-Ford Algorithm — Shortest paths tolerating negative edge weights.
- Floyd-Warshall Algorithm — All-pairs shortest paths via dynamic programming.
- A* Search — Heuristic-guided shortest path search.
- Minimum Spanning Tree — Cheapest set of edges connecting all vertices.
- Kruskal's Algorithm — MST built by adding lightest edges avoiding cycles.
- Prim's Algorithm — MST grown from one vertex by adding cheapest crossing edge.
- Strongly Connected Components — Maximal vertex groups mutually reachable in a directed graph.
- Maximum Flow — Greatest amount of flow pushable through a capacity network.
- KMP Algorithm — Linear-time string matching using a failure table.
- Rabin-Karp Algorithm — String search using rolling hashes.
- Huffman Coding — Optimal prefix codes built from symbol frequencies.
- Randomized Algorithms — Algorithms using random choices to achieve expected efficiency.
- Approximation Algorithms — Methods guaranteeing near-optimal answers to hard problems.
- Amortized Analysis — Averaging cost over a sequence of operations.
- Convex Hull — Smallest convex polygon enclosing a set of points.
- Fast Fourier Transform — Divide-and-conquer algorithm for the discrete Fourier transform.
- Simulated Annealing — Probabilistic optimization inspired by metallurgical cooling.
How to study Algorithms
Learn each algorithm by tracing it on a small input on paper before you read the code. State its time and space cost, then test a case where it performs badly. Use the Visual Lab sorting, graph and Big-O views to compare algorithms on the same input.
Frequently asked questions
What is Big-O notation?
When should I use dynamic programming?
Is there one best sorting algorithm?
Is it necessary to memorize every algorithm?
How do I know which algorithm to use?
Open the interactive Algorithms area Take the Algorithms quiz
Other areas
- 💻 Programming Fundamentals
- 🧱 Data Structures
- 🔌 Computer Architecture & Logic
- 🖥️ Operating Systems
- 🌐 Computer Networks
- 🗄️ Databases
- 🏗️ Software Engineering
- 🕸️ Web Development
- 🔐 Security & Cryptography
- ∑ Theory & Discrete Math
- 🧬 Languages & Compilers
- 🤖 AI & Machine Learning
- ☁️ Distributed Systems & Cloud
- 🎨 Graphics, Vision & Media
- 📐 Math for Computing
- 🔀 Concurrency & Parallelism
- 📱 Mobile, Embedded & IoT
- 🛠️ DevOps & Tooling
- 🚀 Emerging & Frontier Topics