
Explore how core algorithms appear in interviews and real projects, from sorting and graph theory to testing and efficiency. Understand why strong fundamentals and problem solving drive software engineering success.
Explore recursive functions by printing the 3n+1 sequence from a starting number, handling even and odd steps with a base case at 1, and tracing for beginners.
Explore recursion fundamentals with factorial and array problems, mastering base cases, induction, and step-by-step tracing of functions like sum, average, and maximum.
Explore advanced recursive problems in c++, including right-max and left-max with a start_position parameter, suffix and prefix sums, palindrome checks, tracing, grid path sums, and fibonacci with two recursive calls.
Convert a three-direction grid path problem into a recursive solution using direction arrays to pick the next cell with the maximum value, calling a best function until the base case.
Explore asymptotic complexity to estimate time and memory for algorithms by focusing on large N and dominant terms, learning common big O forms like O(n), O(n^2), and O(1).
Analyze practical time complexity with code examples, determine dominant terms, ignore constants, and classify Big O forms from O(1) to higher polynomial orders, noting nested vs parallel loops.
Explore the math behind big O by focusing on upper bounds, constants, and starting points, and compare worst, average, best, and amortised analyses for practical performance.
Learn to analyze space complexity alongside time, focusing on worst-case memory, dynamic allocations, and auxiliary space, with examples of O(n), O(n^2), and memory leaks.
Explore STL's intro sort hybrid of quick sort, heap sort, and insertion sort, and note how proper comparators and logical ordering prevent runtime errors.
Apply count sort to sort numbers by frequencies, using a frequency array from 0 to max value, achieving O(N+K) time and O(K) space, though not stable, adaptive, online, or in-place.
You may wonder why there is med to hard challenges
and later easy challenges
The first homework is about changing the sorting algorithm themselves
The later ones are about using the sorting algorithms
Explore three medium binary search challenges: smallest valid divisor with ceiling division; bloom-day simulation for adjacent bouquets; and minimum heater radius to cover all houses.
Mastering critical skills in algorithms using C++ teaches binary search on days to determine minimum days to produce enough bouquets, using a monotonic possible function and a greedy grouping strategy.
Apply binary search to find the square root by comparing mid*mid with the target, starting from zero with an upper bound. Add a tiny 1e-9 epsilon and cast to int.
Discover how binary search generalizes to monotonic functions and arrays, handling overflow, first/last occurrences, and domain considerations, while mastering search patterns and complexity insights.
Explore graph theory by treating objects as nodes and relationships as edges, and learn to compute paths and shortest paths in maps, networks, and social media.
Tackle two hard graph representation challenges using adjacency matrices in c++: implement a linear-time universal sink finder and interpret the square of a binary adjacency matrix.
Explain the universal sink problem and prove that at most one sink exists, then compare brute-force O(v) checks with an O(v) linear-time approach using an adjacency matrix.
Learn how to use the adjacency matrix to count paths of a given length by powering matrices, interpreting C[i][j], and exploring simple versus non-simple paths, cycles, and DAGs.
Learn the depth first search algorithm for graph traversal using recursion on adjacency lists to determine reachability and build a rooted dfs tree of reachable nodes.
Explore efficient grid dfs in matrices using direction arrays or nested loops to traverse 8 neighbors, with early validation and notes on recursion vs bfs and randomization for stability.
Learn to solve sub-island and border coloring problems with depth-first search. Implement standard dfs on grid2 to detect connectivity and sub-islands relative to grid1, using a visited array, then identify and recolor boundaries with a safe flood-fill approach.
Identify closed islands by checking boundary contact during dfs, assign connected component ids, and distinguish cycles using a parent-aware dfs to avoid false cycle detection.
Build an undirected graph from given index pairs, identify connected components with dfs, and rearrange letters within each component by sorting indices and letters to achieve the lexicographically smallest string.
Model the numbers as a graph by connecting consecutive values, then find the longest chain via DFS or iterative traversal. Handle duplicates, empty graphs, and start/end identification with degree-one nodes.
Learn to detect cycles in directed graphs with dfs by classifying edges as tree, forward, back, or cross, using started and finished times to identify ancestors and active stack.
Apply a grid-based breadth-first search to find the shortest path from start to hash, using a 2d visited matrix and a queue, with guidance on mutating input versus preserving it.
Model the jumping game as a graph to reach a zero-valued index. Use add, subtract, or xor on numbers 0–1000 and solve the wrap-around lock avoiding dead ends.
Explore bfs-based graph problems, including alternating-color shortest paths, the water jug puzzle, sliding puzzle, and a box-and-keys candy collection challenge, with practical algorithmic insights and optimization notes.
Master the sliding puzzle as a graph problem by modeling states as strings, using a direction array to find neighbors, and solving with BFS.
Apply Kahn's algorithm to compute a topological ordering by counting indegrees and using a ready queue; handle disconnected graphs and detect cycles with O(V+E) time and O(V) space.
Apply a topological sort inspired approach on undirected trees by removing leaves level by level. Find the diameter centers—the middle, one or two centroids—minimizing height.
Apply topological sort to compute completion times by propagating longest-path information through a graph. Use the completionTime vector to aggregate path data and update neighbors with a dynamic programming approach.
Almost all other courses focus on knowledge. In this course, we focus on gaining real skills.
Overall:
The course covers a good subset of algorthmic topics
Learn the inner details of the algorithms and their time & memory complexity analysis
Learn how to code line-by-line
Source code and Slides and provided for all content
An extensive amount of practice to master the taught algorithms (where most other content fails!)
Content of this part
Online Judges and How to use
Recursion: Basics Review
Complexity Analysis (Part 1)
Sorting: Insertion, Selection and Count
Binary Search: Basic and generalised forms
Graph Representation
Graph DFS
Graph BFS
Graph Topological Order
Extensive practice on these subjects
Philosophy of the course 2 parts:
The first part focus on topics that are more common in interviews
The first part focus on topics that require less proving skills. This allow you to sharpen problem-solving skills more first
In the next part we proceed toward other important topics in the Algorithms field.
Teaching Style:
Instead of long theory then coding style, we follow a unique style
I parallelize the concepts with the codes as much as possible
Go Concrete as possible
Use Clear Simple Visualization
Engagement
By the end of the journey
Solid understanding of Algorithms topics in C++
Mastering different skills
Analytical and Problem-Solving skills
Clean coding for algorithms
With the administered problem-solving skills
You can start competitive programming smoothly
A strong step toward interviews preparation
Prerequisites
Programming Skills:
Strong Programming skills
Solving a lot of basic problem-solving problems on fundamentals
Good understanding for basic recursion (E.g. Fibonacci)
STL, especially Vectors, map/set, unordered map/set
Highly Preferred:
Do programming projects
Finish a descent data structure course (extensive data structure practice)
Don't miss such a unique learning experience!
Acknowledgement: “I’d like to extend my gratitude towards Robert Bogan for his help with proofreading the slides for this course”