Programme is based on Competitive Programming Handbook by Antti Laaksonen
The picture of you, not of the topic. Each statement is something you'll be able to do by the end.
I can Algorithm Design and Analysis
I can Data Structures Implementation and Optimization
I can Advanced C++ Programming Techniques
I can Mathematical Foundations for Computing
I can Software Engineering Practices
I can Problem Solving in Competitive Programming
I can Graph Algorithms and Applications
I can String Processing and Pattern Matching
I can Geometric Algorithms and Computational Geometry
I can Probability and Statistical Analysis in Computing
I can Optimization Techniques in Software Development
I can System Design and Architecture
The path through the material. Each lesson tackles one essential question.
How do you start a C++ contest solution rapidly and keep types readable from the first compile?
When do macros speed up coding, and how do you write them safely to avoid subtle bugs?
How do you read multiple test cases, compute Euclidean distances, and print results correctly from standard streams?
How do you make I/O fast, redirect streams to files, and control floating-point precision in outputs?
How do progressions, powers of two, and modular arithmetic help you reason about and implement efficient algorithms?
How do you use vectors effectively—including stack-like operations—to implement linear-time counting sort?
How do you represent and manipulate strings, and how do substrings differ from subsequences in problem solving?
How do prefix/suffix structures and cyclic rotations reveal deeper properties of strings, including balanced parentheses?
How do set operations and logical connectives work together to describe and compute probabilities of combined events?
When should we use an ordered set versus a policy-based indexed set, and how do we insert, query, and erase efficiently?
How can we model classical set operations using bit operations to achieve fast, memory‑efficient computation?
How do binary place value and two’s complement determine the values of signed and unsigned integers?
Why do integers overflow and floats compare unreliably, and how can we write safe code that detects overflow and compares floats correctly?
How can compiler bit-counting primitives be combined with XOR to measure differences efficiently?
How do contest formats, language choices, and preparation resources interact to shape an effective competitive programming strategy?
How do we derive a program’s running time from its structure and express it cleanly in Big O form?
What do different complexity classes imply about how running time scales with input size?
How do we analyze a concrete algorithm like Floyd–Warshall and apply complexity insights to design efficient solutions for new problems?
Why is C++ a strong choice in programming contests, and how do one-dimensional prefix sums turn repeated range-sum queries into O(1) operations?
How can precomputation and bitwise operations replace costly nested loops when answering queries on two-dimensional grids?
How do we implement a correct, concise primality test in C++, and what pitfalls affect its efficiency?
How does building a table of simple facts (like primality) illustrate the dynamic programming idea of preprocessing subproblems for fast queries?
How do we design state transitions and fill tables iteratively, and how does powers-of-two preprocessing enable fast k-step successor queries?
How can we compute an optimal value in linear time and then reconstruct a concrete optimal solution from our DP data?
How do bitmasks represent subsets so we can iterate, update, and optimize over them efficiently in dynamic programming?
How can we more accurately predict runtime by combining asymptotic estimates with constants and amortized analysis?
When should we combine algorithms or process operations in batches to reduce total running time?
How do iterator pairs define ranges so we can traverse containers and apply standard algorithms correctly?
How do we use std::sort effectively and customize ordering with a comparison function?
How does lexicographic ordering of pairs and tuples work, and how do we implement operator< for our own structs to enable sorting?
How can we implement binary search correctly, and when should we use lower_bound/upper_bound or an iterative jump‑halving variant?
How do we adapt binary search to find the smallest valid solution or the peak of a unimodal function without scanning the whole range?
What are the trade-offs between STL set/multiset containers and bitmask encodings for representing and searching sets?
How do maps support safe key–value access and iteration, and how can we compress large keys into compact indices for array-based algorithms?
How do restricted-access linear containers work, and how does a stack solve the nearest smaller element problem in linear time?
When does the greedy coin change algorithm produce an optimal solution, and how can we recognize or construct cases where it fails?
How can we find the kth order statistic efficiently, and why does choosing the median minimize the sum of absolute deviations?
What baseline iteration patterns compute LIS lengths at each index and range sums, and how do we reason about their correctness and complexity?
How do we compute and then reconstruct the minimal sequence of edits between two strings using a dynamic programming table?
How does the two-pointers pattern find target-sum subarrays and pairs in linear time on positive or sorted arrays?
How can we maintain minima or prefix sums efficiently as a window moves or values update in an array?
Why does a 45-degree rotation simplify Manhattan distance problems, and how do we compute and reason with this transform?
Given a successor-style graph, how do adjacency lists, binary lifting, and Floyd’s two-pointer method enable fast k-step navigation and cycle detection?
How do path and cycle properties determine when a problem is acyclic, and how does acyclicity enable dynamic programming modeled on a DAG?
How do we represent and traverse graphs to analyze problems like 2SAT efficiently, and why does recursive DFS run in O(n + m) time?
How do recursive decomposition and modular arithmetic enable efficient exponentiation and primality testing, and when does memoization pay off?
How do tries and polynomial rolling hashes support fast prefix and substring queries on strings?
How can we detect repeating structure and compare (sub)strings efficiently without scanning every character?
How does recursive backtracking systematically explore and prune the space of constraint-satisfying solutions and subsets?
What properties of the Fibonacci sequence enable both efficient computation and a unique representation of any positive integer?
How does splitting a problem into halves lead to faster algorithms for sorting and subset-sum style problems?
How do recursive and iterative methods generate permutations, and what does a backtracking call trace reveal about their operation and pruning?
How can we progress from exhaustive search to more efficient algorithms for maximum subarray, and how do their time complexities compare in practice?
How can we transition from exponential backtracking to dynamic programming over subsets to decide Hamiltonian paths more efficiently?
How do we design dynamic programming recurrences to compute path sums and count tilings on grids?
How can we model and optimize DP states to count or determine feasibility for tilings, integer partitions, and subset sums?
How can graph traversals systematically reveal shortest-path distances, connected components, and two-colorability in unweighted graphs?
How do residual capacities and augmenting paths enable the Ford–Fulkerson method to reach a maximum flow?
How can we encode combinatorial problems as flow networks to find edge-disjoint paths and reduce bipartite matching to maximum flow?
How can pruning strategies shrink the backtracking search space, and how do these optimizations change runtime behavior?
Why does DFS finishing time support constructing a valid topological ordering in a DAG?
How does SCC analysis compress a directed graph into an acyclic component graph that preserves reachability and supports higher-level reasoning?
Why do SCCs of the implication graph determine 2SAT satisfiability, and how can we extract a satisfying assignment from the component order?
How do graph transformations and flow-based methods yield a maximum bipartite matching, and how does Hall’s theorem certify a perfect matching?
How does acyclic dependency structure—via prefixes or topological order—enable efficient counting with dynamic programming in strings and DAGs?
How does the recursive definition of a rooted tree determine every node’s parent–child relationships?
How can precomputed ancestor pointers answer kth-ancestor, lowest common ancestor, and distance queries efficiently?
How can depth-first traversal patterns be used to compute subtree summaries and global metrics like diameter?
How does a heap-based priority queue lead to optimal prefix-free Huffman codes, and how do we measure their compression quality?
What do the theoretical limits of comparison sorting imply for algorithm design, and how do inversions and bubble sort illustrate these costs in practice?
How does sorting, combined with sets/maps, enable efficient sweeps to find common elements, track active events, and identify the closest pair of points?
Why do earliest-finish-time and shortest-duration-first strategies produce optimal schedules under the right constraints?
How does a segment tree support fast range queries and searches, and how does RMQ over an Euler tour transform LCA into a range query problem?
How does a segment tree answer range queries efficiently, and how do recursion and lazy propagation affect its time complexity?
How can we perform fast range updates—both simple increments and polynomial-weighted updates—without touching every element?
When memory needs or dimensionality change, how do dynamic, persistent, and 2D segment trees adapt the core idea to fit the problem?
How does block-based ordering let us answer many range queries quickly by moving endpoints and maintaining frequencies?
Given a range-query problem, how do we choose among Fenwick/segment trees, sweep-line integration, or sparse tables for the best performance?
Why does a priority queue make Dijkstra’s algorithm efficient, and how does it guarantee correct shortest paths without negative edges?
Once we know local optimal distances, how can dynamic programming aggregate path counts on DAGs and compute maximum path lengths from every tree node?
How does Bellman–Ford find shortest paths and reveal negative cycles, and what changes in its behavior when such cycles exist?
How do early stopping and SPFA speed up Bellman–Ford in practice, and why does Dijkstra fail in the presence of negative edges?
How can rooting a tree and using carefully structured traversals (DP states or Euler-tour arrays) let us compute the diameter, subtree sums, and root-to-node path sums efficiently?
When do pairs of traversal sequences uniquely determine a binary tree, and how do we reconstruct the tree when they do?
How does union by size enable efficient find and unite operations, and why do these operations run in O(log n) time?
How can a single depth-first traversal combined with union-find and data-structure merging answer subtree and lowest common ancestor queries offline in near-linear time?
What makes a subset of edges a spanning tree, and how can total weights identify the minimum and maximum spanning trees among candidates?
Why does repeatedly adding the lightest edge that avoids cycles yield a minimum spanning tree, and how can we implement this efficiently?
How does Prim’s algorithm expand a minimum spanning tree from a seed using a priority queue to select the next edge efficiently?
How do we apply greedy selection to build minimum spanning trees, and in what ways is Prim’s algorithm similar to and different from Dijkstra’s shortest-path method?
How can we recognize Hamiltonian paths and circuits, and why is deciding their existence computationally hard?
How does viewing the chessboard as a graph turn the knight’s tour into a Hamiltonian path problem, and how can Warnsdorf’s rule guide an effective search?
Why are maximum flow values equal to minimum cut capacities, and how do we identify a minimum cut in a given network?
How does Kőnig’s theorem let us derive a minimum node cover from a maximum matching and then obtain a maximum independent set as its complement?
How can matchings and antichains be used to compute a minimum node-disjoint path cover in a DAG?
How do prime factorization and Euclid’s algorithm work together to reveal integer structure and compute greatest common divisors?
How does the extended Euclidean algorithm enable solving ax + by = c, computing modular inverses, and applying the Chinese remainder theorem?
What patterns govern representing integers as sums of squares, and how can we systematically generate primitive Pythagorean triples?
How does prime factorization enable efficient computation of divisor counts, divisor sums, and Euler’s totient, and how do logarithm properties simplify these calculations?
How can recursion and rotational symmetry turn difficult counting problems, such as necklace colorings, into manageable calculations?
How do factorial and binomial identities support modeling real counting problems as balls-into-boxes scenarios?
How do we compute probabilities by counting outcomes and aggregating probabilities over a sample space?
How does conditioning change probability, and how can we apply it to sequential processes and to assessing collision risk in hashing?
How do we compute and interpret the expected value of a discrete random variable by recognizing and using common distribution formulas?
Why does expectation add linearly, and how does that fact explain why the mean minimizes total squared deviation?
How can independent random choices and expectation guarantee a good two-coloring of a graph?
What makes Catalan numbers appear across structures like trees, and how do the recurrence and the closed form connect?
How does the inclusion–exclusion principle let us calculate unions and, by inversion, recover intersections?
How can we count derangements using inclusion–exclusion and then derive and apply their recursive formula?
How do matrix dimensions and indexing translate a graph into an adjacency matrix representation?
How do vertex degree measures lead to conditions (Dirac’s and Ore’s) that ensure Hamiltonian paths exist?
How do simplicity constraints and leaf-based reasoning characterize trees and explain their fundamental edge and path properties?
Why does reversing all edges enable the two-pass strategy of Kosaraju’s algorithm to find strongly connected components?
When does a graph have an Eulerian path or circuit, and how can Hierholzer’s algorithm construct an Eulerian circuit?
How can we encode different combinatorial structures as sequences—using Eulerian paths for De Bruijn graphs and leaf-removal for labeled trees?
How do Prüfer codes both reconstruct a labeled tree and explain why there are n^(n−2) labeled trees?
How can matrices and complex numbers serve as interchangeable representations of two-dimensional vectors and points?
How do length, angle (argument), and the 2D cross product together describe distances and left/right turns in the plane?
How can triangulation and point-orientation checks be combined to compute polygon areas and construct the convex hull of a point set?
How do entrywise operations and transposition transform a matrix while preserving its structure and dimensions?
How does the matrix product rule underlie both ordinary multiplication and counting fixed-length paths via powers of an adjacency matrix?
How does the Floyd–Warshall algorithm iteratively update a distance matrix, and what changes occur at each step when a new intermediate is considered?
How does the identity matrix act in multiplication, and how can we exploit its properties to probabilistically verify a claimed product efficiently?
How can efficient matrix exponentiation enable fast computation of powers and model linear recurrences to predict future terms?
How do determinants and cofactors lead to the adjugate inverse, and how can matrix-based formulas be used to count structured objects like grid tilings?
How can we represent both random processes and sequential games as directed graphs to make states and legal moves explicit and classify positions?
How does a transition matrix encode a Markov chain, and how do we compute the distribution after k steps?
When the number of steps is large, how can matrix powers and dynamic programming accelerate Markov chain evolution?
How does the nim-sum characterize winning positions in Nim, and how do we use it to choose winning moves—including in misère endgames?
How does combining independent impartial games reduce to Nim via the Sprague–Grundy theorem?
How do we compute Grundy numbers in practice, including for heap-splitting games, to analyze optimal play?
How do we compare two strings lexicographically at scale by efficiently finding their longest common prefix?
How do trie traversals support inserting strings, checking membership, and finding the longest stored prefix of a query?
How can we augment a trie to count how many strings share a prefix, and how do prefix relationships reveal invalid binary codes?
How can we construct and use the Z-array to perform linear-time pattern matching, and why does this approach run in O(n)?
How can we compute a polygon’s area either from vertex coordinates (shoelace) or from lattice point counts (Pick’s), and when is each method applicable?
How does the 2D cross product enable orientation, distance-to-line, and segment-intersection tests, and how do these combine to decide if a point lies inside a polygon?
How does rotating coordinates turn Manhattan distance into a max over axes, and how does that simplify finding the farthest pair of points?
Three ways to connect: Claude Code (PAT + install command), Claude Desktop (.mcpb download — no token to paste), or Claude web (Customise → Connectors → Add custom connector, OAuth). Same MCP endpoint, same identity on every path.
https://nebular.live/api/v1/mcp/