From intermediate to expert, one chapter at a time.
An interactive companion to Competitive Programmer’s Handbook: every idea explained in English and Hinglish, every algorithm in tested Java, and step-through visualisers you can feed your own input.Competitive Programmer’s Handbook ka interactive saathi: har idea English aur Hinglish mein, har algorithm tested Java mein, aur aise visualisers jinhe tum apna input dekar step-by-step chala sakte ho.
Progress is saved in this browser. Sign in to sync your progress, notes and CSES solutions across all your devices.Progress abhi sirf is browser mein save hai. Sign in karo toh progress, notes aur CSES solutions tumhare saare devices pe sync honge.
Signed in as ·
My study: notes, solutions, export →Basic techniques
The toolkit every contest problem builds on: complexity, sorting, search, greedy, DP and range queries.Har contest problem ki neev yahi hai — complexity, sorting, search, greedy, DP aur range queries.
Introduction
Java for competitive programming: fast I/O, overflow, modular arithmetic and the maths you need.CP ke liye Java setup: fast I/O, overflow se bachna, modulo aur zaroori maths.
Time complexity
Estimate whether an idea is fast enough before you write a single line.Code likhne se pehle hi pata karo ki idea time limit mein chalega ya nahi.
Sorting
Sorting theory, sorting in Java, and binary search as a problem-solving tool.Sorting ki theory, Java mein sorting, aur binary search ko tool ki tarah use karna.
Data structures
The Java Collections you will use daily, mapped from the C++ STL.Roz kaam aane wale Java Collections — C++ STL ke equivalent ke saath.
Complete search
Generate every candidate, then prune the search until it is fast enough.Saare possible answers generate karo, phir pruning se search ko fast banao.
Greedy algorithms
When the locally best choice is globally optimal — and how to prove it.Kab har step pe best choice lena overall best answer deta hai — aur ise prove kaise karein.
Dynamic programming
Break a problem into overlapping subproblems and solve each exactly once.Problem ko overlapping subproblems mein todo aur har ek ko sirf ek baar solve karo.
Amortized analysis
Two pointers, monotonic stacks and sliding windows: cheap on average, even if one step is costly.Two pointers, monotonic stack aur sliding window — ek step mehenga ho sakta hai, par average sasta.
Range queries
Prefix sums, sparse tables, Fenwick trees and segment trees for fast queries on subarrays.Subarray pe fast queries ke liye prefix sums, sparse table, Fenwick tree aur segment tree.
Bit manipulation
Integers as bit strings: tricks, sets as bitmasks and DP over subsets.Numbers ko bits ki tarah socho: tricks, bitmask se sets, aur subsets pe DP.
Graph algorithms
Traversals, shortest paths, trees, connectivity, matching and flows.Graph ko explore karna, shortest path nikalna, trees, connectivity, matching aur flows.
Basics of graphs
Graph vocabulary and the three ways to store a graph in code.Graph ki basic terms aur code mein graph store karne ke teen tareeke.
Graph traversal
Depth-first and breadth-first search, and what they let you check.DFS aur BFS — aur inse kya-kya check kar sakte hain.
Shortest paths
Bellman–Ford, Dijkstra and Floyd–Warshall, and when to use each one.Bellman–Ford, Dijkstra aur Floyd–Warshall — kaunsa kab use karna hai.
Tree algorithms
Traversals, diameters and longest paths from every node.Tree traversal, diameter, aur har node se longest path.
Spanning trees
Minimum spanning trees with Kruskal's and Prim's algorithms, plus union-find.Kruskal aur Prim se minimum spanning tree, saath mein union-find.
Directed graphs
Topological order, DP on DAGs, successor graphs and cycle detection.Topological order, DAG pe DP, successor graphs aur cycle detection.
Strong connectivity
Strongly connected components with Kosaraju's algorithm, and 2SAT.Kosaraju se strongly connected components, aur 2SAT problem.
Tree queries
Ancestors, subtree and path queries, and lowest common ancestors.Ancestors, subtree aur path queries, aur lowest common ancestor.
Paths and circuits
Eulerian and Hamiltonian paths, De Bruijn sequences and knight's tours.Eulerian aur Hamiltonian paths, De Bruijn sequence aur knight's tour.
Flows and cuts
Maximum flow, minimum cut, disjoint paths, matchings and path covers.Maximum flow, minimum cut, disjoint paths, matching aur path covers.
Advanced topics
Number theory, combinatorics, strings, sqrt tricks, advanced segment trees and geometry.Number theory, combinatorics, strings, sqrt tricks, advanced segment trees aur geometry.
Number theory
Primes, gcd, modular arithmetic and solving equations with integers.Primes, gcd, modular arithmetic aur integer equations solve karna.
Combinatorics
Counting without listing: binomials, Catalan numbers, inclusion–exclusion and Burnside.Bina list kiye ginna: binomials, Catalan numbers, inclusion–exclusion aur Burnside.
Matrices
Matrix power for linear recurrences and counting paths in graphs.Matrix power se linear recurrences aur graph mein paths count karna.
Probability
Expected values, Markov chains and randomized algorithms.Expected value, Markov chains aur randomized algorithms.
Game theory
Winning and losing states, Nim, and Grundy numbers.Winning aur losing states, Nim game, aur Grundy numbers.
String algorithms
Tries, polynomial hashing and the Z-algorithm.Trie, polynomial hashing aur Z-algorithm.
Square root algorithms
Split work into √n blocks; Mo's algorithm for offline queries.Kaam ko √n blocks mein baanto; offline queries ke liye Mo's algorithm.
Segment trees revisited
Lazy propagation, dynamic and persistent trees, and 2D segment trees.Lazy propagation, dynamic aur persistent trees, aur 2D segment tree.
Geometry
Points and lines with cross products, polygon area and distance functions.Cross product se points aur lines, polygon area aur distance functions.
Sweep line algorithms
Sweep across the plane to find intersections, the closest pair and the convex hull.Plane pe line sweep karke intersections, closest pair aur convex hull nikalna.