
Explore core algorithms and efficient problem solving, from Big O notation to practical implementation. Practice graph theory, shortest paths, and dynamic programming with hands-on coding in C++ and Codeforces-style problems.
Learn to analyze runtime using big O notation and asymptotic complexity, comparing linear and quadratic algorithms through examples like searching a list and checking pairs summing to x.
Explore graphs with vertices and edges, including undirected, weighted, connected graphs, trees, cycles, and roots with leaves, and learn representation via adjacency lists and matrices.
Learn breadth-first search using a queue to discover the shortest distance in unweighted graphs, including grids with obstacles, by exploring nodes in wavefront order and tracking visited nodes.
Discover how to compute the shortest path with Dijkstra's algorithm on a nonnegative weighted undirected graph, using a distance table, a priority queue, and parent pointers to reconstruct the path.
Explain why Dijkstra's algorithm yields correct shortest distances for visited nodes and non-negative weights, and compare priority queue options like set, priority queue, and Fibonacci heap and impact on runtime.
Implement Dijkstra's algorithm in C++ to solve shortest paths on a weighted graph, using an adjacency list and a priority queue, and reconstruct the path from 0 to n-1.
Explain how the Bellman-Ford algorithm finds shortest paths in graphs with negative edges, runs n-1 iterations, detects negative cycles, and compares to Dijkstra's approach for directed graphs.
Apply dynamic programming to break problems into simpler subproblems. Use memorization and a bottom-up approach to compute results from base cases, avoiding redundant work.
Explore the knapsack problem by modeling a backpack with capacity and infinite stock. Maximize profit with dynamic programming and a bottom-up approach, including a 0/1 variant.
Color a tree with three colors so adjacent nodes differ and count colorings by rooting the tree, using a bottom-up dynamic programming approach that multiplies child contributions for each color.
You have some programming experience and now want to take your skills to a new level? Learning algorithms and mastering algorithmic thinking is by far the most effective way of rapidly improving as a developer and problems solver.
That's why I will teach you the most interesting and useful algorithms in this course. (I intentionally skipped sorting algorithms as they are so over-discussed and rarely need to be implemented by yourself).
For each algorithm or topic, I give a concise explanation, example and implementation outline. Then it's your turn to apply the new learned algorithm to solve real problems. For that, I hand-picked tasks from programming websites. When you struggle with an issue and need help, I answer every question and provide personal feedback for your problems.
Sign up now and begin a new chapter in your programming world.