Skip to content

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.

0of 4 sections done4 mein se sections done
0day streakdin ki streak
0CSES solved
Study activity · last 16 weeksStudy activity · pichhle 16 hafte
PART I

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.

01quick revisioncoming soonjald aa raha

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.

02quick revisioncoming soonjald aa raha

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.

03quick revisioncoming soonjald aa raha

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.

04quick revisioncoming soonjald aa raha

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.

05coming soonjald aa raha

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.

06coming soonjald aa raha

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.

07coming soonjald aa raha

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.

08coming soonjald aa raha

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.

09

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.

0/4
10coming soonjald aa raha

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.

PART II

Graph algorithms

Traversals, shortest paths, trees, connectivity, matching and flows.Graph ko explore karna, shortest path nikalna, trees, connectivity, matching aur flows.

11coming soonjald aa raha

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.

12coming soonjald aa raha

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.

13coming soonjald aa raha

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.

14coming soonjald aa raha

Tree algorithms

Traversals, diameters and longest paths from every node.Tree traversal, diameter, aur har node se longest path.

15coming soonjald aa raha

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.

16coming soonjald aa raha

Directed graphs

Topological order, DP on DAGs, successor graphs and cycle detection.Topological order, DAG pe DP, successor graphs aur cycle detection.

17coming soonjald aa raha

Strong connectivity

Strongly connected components with Kosaraju's algorithm, and 2SAT.Kosaraju se strongly connected components, aur 2SAT problem.

18coming soonjald aa raha

Tree queries

Ancestors, subtree and path queries, and lowest common ancestors.Ancestors, subtree aur path queries, aur lowest common ancestor.

19coming soonjald aa raha

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.

20coming soonjald aa raha

Flows and cuts

Maximum flow, minimum cut, disjoint paths, matchings and path covers.Maximum flow, minimum cut, disjoint paths, matching aur path covers.

PART III

Advanced topics

Number theory, combinatorics, strings, sqrt tricks, advanced segment trees and geometry.Number theory, combinatorics, strings, sqrt tricks, advanced segment trees aur geometry.

21coming soonjald aa raha

Number theory

Primes, gcd, modular arithmetic and solving equations with integers.Primes, gcd, modular arithmetic aur integer equations solve karna.

22coming soonjald aa raha

Combinatorics

Counting without listing: binomials, Catalan numbers, inclusion–exclusion and Burnside.Bina list kiye ginna: binomials, Catalan numbers, inclusion–exclusion aur Burnside.

23coming soonjald aa raha

Matrices

Matrix power for linear recurrences and counting paths in graphs.Matrix power se linear recurrences aur graph mein paths count karna.

24coming soonjald aa raha

Probability

Expected values, Markov chains and randomized algorithms.Expected value, Markov chains aur randomized algorithms.

25coming soonjald aa raha

Game theory

Winning and losing states, Nim, and Grundy numbers.Winning aur losing states, Nim game, aur Grundy numbers.

26coming soonjald aa raha

String algorithms

Tries, polynomial hashing and the Z-algorithm.Trie, polynomial hashing aur Z-algorithm.

27coming soonjald aa raha

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.

28coming soonjald aa raha

Segment trees revisited

Lazy propagation, dynamic and persistent trees, and 2D segment trees.Lazy propagation, dynamic aur persistent trees, aur 2D segment tree.

29coming soonjald aa raha

Geometry

Points and lines with cross products, polygon area and distance functions.Cross product se points aur lines, polygon area aur distance functions.

30coming soonjald aa raha

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.