
Competitive Programmer's Handbook
by Antti Laaksonen · Draft, Jan 2018 Edition · 2018
A free, comprehensive guide to competitive programming covering all major algorithms and data structures with clear explanations and CSES Practice problems.
220Extracted Problems
30Chapters
0Linked to DB
220Book Total
CompetitiveFreeCSESAlgorithmsMathematics
220 shown
- E1.1CSES — Weird AlgorithmSimulationEasyE1.2CSES — Missing NumberMathEasyE1.3CSES — RepetitionsStringsEasyE1.4CSES — Increasing ArrayGreedyEasyE1.5CSES — PermutationsConstructionEasy1-6Problem 1.6Easy1-7Problem 1.7Easy
- E2.1CSES — Apple DivisionBruteForceEasyE2.2CSES — Chessboard and QueensBacktrackingMediumE2.3CSES — Bit StringsMathModularEasyE2.4CSES — Trailing ZerosMathEasyE2.5CSES — Coin PilesMathEasy2-6Problem 2.6Easy2-7Problem 2.7Easy
- E3.1CSES — ApartmentsSortingGreedyEasyE3.2CSES — Ferris WheelSortingTwoPointersEasyE3.3CSES — Concert TicketsSortingBinarySearchMediumE3.4CSES — Restaurant CustomersSortingSweepLineMediumE3.5CSES — Movie FestivalSortingGreedyEasyE3.6CSES — Sum of Two ValuesTwoPointersHashEasy3-7Problem 3.7Easy
- E4.1CSES — Distinct NumbersSetEasyE4.2CSES — Collecting NumbersSetEasyE4.3CSES — Collecting Numbers IISetSimulationMediumE4.4CSES — PlaylistSlidingWindowSetEasyE4.5CSES — TowersGreedyMultiSetEasyE4.6CSES — Traffic LightsSetBinarySearchMediumE4.7CSES — Josephus ISimulationEasyE4.8CSES — Josephus IISetOrderedSetMedium
- E5.1CSES — Increasing SubsequenceBinarySearchDPEasyE5.2CSES — Two KnightsMathCountingMediumE5.3CSES — Grid PathsBacktrackingPruningMedium5-4Problem 5.4Medium5-5Problem 5.5Hard5-6Problem 5.6Easy5-7Problem 5.7Easy
- E6.1CSES — Coin ProblemGreedyEasyE6.2CSES — Stick LengthsGreedyMathMediumE6.3CSES — Polygon Lattice PointsGreedyMathMediumE6.4CSES — Missing Coin SumGreedySortingEasyE6.5CSES — Collecting Numbers IIGreedyMediumE6.6CSES — Tasks and DeadlinesGreedySchedulingMedium6-7Problem 6.7Easy
- E7.1CSES — Dice CombinationsDPEasyE7.2CSES — Minimizing CoinsDPKnapsackEasyE7.3CSES — Coin Combinations IDPCountingEasyE7.4CSES — Coin Combinations IIDPCountingEasyE7.5CSES — Removing DigitsDPGreedyEasyE7.6CSES — Grid PathsDPGridMediumE7.7CSES — Book ShopDPKnapsackMediumE7.8CSES — Array DescriptionDPMediumE7.9CSES — Coin Problem (Path)DPMediumE7.10CSES — Edit DistanceDPStringsMediumE7.11CSES — Rectangle CuttingDPIntervalDPMediumE7.12CSES — Money SumsDPKnapsackMediumE7.13CSES — Removal GameDPGameTheoryHardE7.14CSES — Two Sets IIDPCountingHard
- E8.1CSES — Sliding MedianSlidingWindowHeapHardE8.2CSES — Sliding CostSlidingWindowHeapHardE8.3CSES — Range Queries and CopiesPersistentSegTreeHard8-4Problem 8.4Medium8-5Problem 8.5Hard8-6Problem 8.6Easy8-7Problem 8.7Easy
- E9.1CSES — Static Range Sum QueriesPrefixSumEasyE9.2CSES — Static Range Minimum QueriesSparseTableEasyE9.3CSES — Dynamic Range Sum QueriesFenwickTreeEasyE9.4CSES — Dynamic Range Minimum QueriesSegTreeMediumE9.5CSES — Range Xor QueriesPrefixSumBitEasyE9.6CSES — Range Update QueriesFenwickTreeDiffArrayMediumE9.7CSES — Forest QueriesPrefixSum2DMediumE9.8CSES — Hotel QueriesSegTreeBinarySearchMedium
- E10.1CSES — Flag ArrangementsBitmaskDPMediumE10.2CSES — Counting TilingsBitmaskDPProfileDPHardE10.3CSES — Counting NumbersDigitDPHard10-4Problem 10.4Medium10-5Problem 10.5Hard10-6Problem 10.6Easy10-7Problem 10.7Easy
- E11.1CSES — Counting RoomsDFSGridEasyE11.2CSES — LabyrinthBFSGridEasyE11.3CSES — Building RoadsBFSUnionFindEasyE11.4CSES — Message RouteBFSEasyE11.5CSES — Building TeamsBFSBipartiteEasyE11.6CSES — Round TripDFSCycleMediumE11.7CSES — MonstersBFSMultiSourceMedium
- E12.1CSES — Course ScheduleTopSortDAGEasyE12.2CSES — Longest Flight RouteDAGDPMediumE12.3CSES — Game RoutesDAGDPMediumE12.4CSES — InvestigationDijkstraDAGHardE12.5CSES — Planets Queries IFunctionalGraphBinaryLiftingMediumE12.6CSES — Planets Queries IIFunctionalGraphSCCHard12-7Problem 12.7Easy
- E13.1CSES — Shortest Routes IDijkstraEasyE13.2CSES — Shortest Routes IIFloydWarshallEasyE13.3CSES — High ScoreBellmanFordNegCycleMediumE13.4CSES — Flight DiscountDijkstraDPMediumE13.5CSES — Cycle FindingBellmanFordNegCycleMediumE13.6CSES — Flight RoutesKShortestPathsHardE13.7CSES — Round Trip IIDijkstraCycleHard
- E14.1CSES — SubordinatesTreeDFSEasyE14.2CSES — Tree MatchingTreeDPMediumE14.3CSES — Tree DiameterTreeBFSEasyE14.4CSES — Tree Distances ITreeReRootingMediumE14.5CSES — Tree Distances IITreeReRootingHardE14.6CSES — Company Queries ILCABinaryLiftingMediumE14.7CSES — Company Queries IILCAHardE14.8CSES — Distance QueriesLCATreeHard
- E15.1CSES — Road ReparationMSTKruskalEasyE15.2CSES — Road ConstructionUnionFindMSTMedium15-3Problem 15.3Medium15-4Problem 15.4Medium15-5Problem 15.5Hard15-6Problem 15.6Easy15-7Problem 15.7Easy
- E16.1CSES — Planets and KingdomsSCCKosarajuMediumE16.2CSES — Giant PizzaTwoSATSCCHardE16.3CSES — Coin CollectorSCCDAGHardE16.4CSES — Mail DeliveryEulerPathGraphHardE16.5CSES — Teleporters PathEulerPathDAGHard16-6Problem 16.6Easy16-7Problem 16.7Easy
- E17.1CSES — Distinct RoutesMaxFlowBFSHardE17.2CSES — School DanceBipartiteMatchingHardE17.3CSES — Forbidden CitiesDijkstraBipartiteHard17-4Problem 17.4Medium17-5Problem 17.5Hard17-6Problem 17.6Easy17-7Problem 17.7Easy
- E18.1CSES — Path QueriesHLDSegTreeHardE18.2CSES — Path Queries IIHLDSegTreeHardE18.3CSES — Distinct ColorsDFSSmallToLargeHardE18.4CSES — Finding a CentroidTreeCentroidMedium18-5Problem 18.5Hard18-6Problem 18.6Easy18-7Problem 18.7Easy
- E19.1CSES — Eulerian PathEulerPathGraphMediumE19.2CSES — Hamiltonian FlightsBitmaskDPHamiltonianHardE19.3CSES — Knight's TourBacktrackingWarnsdorffHard19-4Problem 19.4Medium19-5Problem 19.5Hard19-6Problem 19.6Easy19-7Problem 19.7Easy
- E20.1CSES — Download SpeedMaxFlowMediumE20.2CSES — Police ChaseMinCutMaxFlowMediumE20.3CSES — School DanceBipartiteMatchingHardE20.4CSES — Distinct RoutesEdgeDisjointPathsHard20-5Problem 20.5Hard20-6Problem 20.6Easy20-7Problem 20.7Easy
- E21.1CSES — Counting DivisorsMathSieveEasyE21.2CSES — Common DivisorsMathGCDEasyE21.3CSES — Sum of DivisorsMathNumberTheoryMediumE21.4CSES — Divisor AnalysisMathPrimeFactorizationMediumE21.5CSES — Prime MultiplesMathInclusionExclusionMediumE21.6CSES — Counting Coprime PairsMathMobiusHard21-7Problem 21.7Easy
- E22.1CSES — Counting NecklacesCombinatoricsBurnsideHardE22.2CSES — Counting GridsCombinatoricsBurnsideHardE22.3CSES — Binomial CoefficientsMathModularArithmeticEasyE22.4CSES — Creating Strings IICombinatoricsMathMediumE22.5CSES — Distributing ApplesCombinatoricsStars&BarsMediumE22.6CSES — Christmas PartyCombinatoricsDerangementMedium22-7Problem 22.7Easy
- E23.1CSES — FibonacciMatrixExpEasyE23.2CSES — Counting PathsMatrixExpGraphMediumE23.3CSES — Ermitteln Fibonacci NumbersMatrixExpNumberTheoryMedium23-4Problem 23.4Medium23-5Problem 23.5Hard23-6Problem 23.6Easy23-7Problem 23.7Easy
- E24.1CSES — Dice ProbabilityProbabilityDPEasyE24.2CSES — Moving RobotsProbabilityDPHardE24.3CSES — CandiesProbabilityDPHardE24.4CSES — SightseeingProbabilityDijkstraHard24-5Problem 24.5Hard24-6Problem 24.6Easy24-7Problem 24.7Easy
- E25.1CSES — Nim Game IGameTheoryNimEasyE25.2CSES — Nim Game IIGameTheoryGrundyMediumE25.3CSES — Staircase NimGameTheoryNimMediumE25.4CSES — Grundy's GameGameTheoryMemoizationHardE25.5CSES — Another GameGameTheoryGrundyHard25-6Problem 25.6Easy25-7Problem 25.7Easy
- E26.1CSES — Word CombinationsStringsDPMediumE26.2CSES — String MatchingStringsKMPEasyE26.3CSES — Finding BordersStringsKMPMediumE26.4CSES — Finding PeriodsStringsKMPMediumE26.5CSES — Minimal RotationStringsBoothHardE26.6CSES — Longest PalindromeStringsManacherMediumE26.7CSES — Palindrome QueriesStringsHashingHard
- E27.1CSES — Increasing Array IIMoSqrtDecompHardE27.2CSES — List RemovalsSqrtDecompOrderedSetHardE27.3CSES — Salary QueriesMoFenwickTreeHard27-4Problem 27.4Medium27-5Problem 27.5Hard27-6Problem 27.6Easy27-7Problem 27.7Easy
- E28.1CSES — Range Queries and CopiesPersistentSegTreeHardE28.2CSES — New Road QueriesSegTreeLCAHardE28.3CSES — Dynamic Range QueriesMergeSortTreeHard28-4Problem 28.4Medium28-5Problem 28.5Hard28-6Problem 28.6Easy28-7Problem 28.7Easy
- E29.1CSES — Point Location TestGeometryCrossProductEasyE29.2CSES — Line Segment IntersectionGeometrySegmentsMediumE29.3CSES — Polygon AreaGeometryShoelaceEasyE29.4CSES — Point in PolygonGeometryRayCastingMediumE29.5CSES — Minimum Euclidean DistanceGeometryClosestPairHardE29.6CSES — Convex HullGeometryConvexHullMedium29-7Problem 29.7Easy
- E30.1CSES — Tasks and DeadlinesSweepLineGreedyMediumE30.2CSES — Concert TicketsSweepLineBinarySearchMediumE30.3CSES — Sum of Three ValuesSweepLineTwoPointersMedium30-4Problem 30.4Medium30-5Problem 30.5Hard30-6Problem 30.6Easy30-7Problem 30.7Easy