Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tamimehsan/cses-solutions


https://github.com/tamimehsan/cses-solutions

cpp cses cses-problem-set-solution cses-solutions

Last synced: about 15 hours ago
JSON representation

Awesome Lists containing this project

README

        

This was my practice run for ICPC. There are more than 250 accepted solutions listed here. I have also added tags for some of the problems.

- At first try to come up with a solution by yourself.
- If you can't then read some article on the associated tags and try again.
- If you still can't then you proceed to the solution. Try to understand what is going on. Then try your own approach.

The CSES problems can be found here: https://cses.fi/problemset/list/
This set has some classic problems.

Milestones:

- [x] 25/11/2021: `Solved all Introductory Problems`
- [x] 30/11/2021: `Solved all Tree Problems`
- [x] 29/12/2021: `Solved 100th Problem`
- [x] 05/05/2022: `Solved 150th Problem`
- [x] 04/10/2022: `Solved all Geometry Problems`
- [x] 05/12/2022: `Solved 200th Problem`
- [x] 06/11/2023: `Solved all Range Query Problems`
- [x] 11/11/2023: `Solved 250th Problem`
- [x] 03/12/2023: `Solved all Sorting and Searching Problems`

## Introductory Problems
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Weird Algorithm | | [Code](Introductory%20Problems/Weird%20Algorithm.cpp) |
| ✔ | Missing Number | | [Code](Introductory%20Problems/Missing%20Number.cpp) |
| ✔ | Repetitions | | [Code](Introductory%20Problems/Repetitions.cpp) |
| ✔ | Increasing Array | | [Code](Introductory%20Problems/Increasing%20Array.cpp) |
| ✔ | Permutations | | [Code](Introductory%20Problems/Permutations.cpp) |
| ✔ | Number Spiral | | [Code](Introductory%20Problems/Number%20Spiral.cpp) |
| ✔ | Two Knights | | [Code](Introductory%20Problems/Two%20Knights.cpp) |
| ✔ | Two Sets | | [Code](Introductory%20Problems/Two%20Sets.cpp) |
| ✔ | Bit Strings | | [Code](Introductory%20Problems/Bit%20Strings.cpp) |
| ✔ | Trailing Zeros | | [Code](Introductory%20Problems/Trailing%20Zeros.cpp) |
| ✔ | Coin Piles | | [Code](Introductory%20Problems/Coin%20Piles.cpp) |
| ✔ | Palindrome Reorder | | [Code](Introductory%20Problems/Palindrome%20Reorder.cpp) |
| ✔ | Gray Code | | [Code](Introductory%20Problems/Gray%20Code.cpp) |
| ✔ | Tower of Hanoi | | [Code](Introductory%20Problems/Tower%20of%20Hanoi.cpp) |
| ✔ | Creating Strings | | [Code](Introductory%20Problems/Creating%20Strings.cpp) |
| ✔ | Apple Division | | [Code](Introductory%20Problems/Apple%20Division.cpp) |
| ✔ | Chessboard and Queens | | [Code](Introductory%20Problems/Chessboard%20and%20Queens.cpp) |
| ✔ | Digit Queries | | [Code](Introductory%20Problems/Digit%20Queries.cpp) |
| ✔ | Grid Paths | | [Code](Introductory%20Problems/Grid%20Paths.cpp) |
## Sorting and Searching
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Distinct Numbers | | [Code](Sorting%20and%20Searching/Distinct%20Numbers.cpp) |
| ✔ | Apartments | | [Code](Sorting%20and%20Searching/Apartments.cpp) |
| ✔ | Ferris Wheel | | [Code](Sorting%20and%20Searching/Ferris%20Wheel.cpp) |
| ✔ | Concert Tickets | | [Code](Sorting%20and%20Searching/Concert%20Tickets.cpp) |
| ✔ | Restaurant Customers | | [Code](Sorting%20and%20Searching/Restaurant%20Customers.cpp) |
| ✔ | Movie Festival | | [Code](Sorting%20and%20Searching/Movie%20Festival.cpp) |
| ✔ | Sum of Two Values | | [Code](Sorting%20and%20Searching/Sum%20of%20Two%20Values.cpp) |
| ✔ | Maximum Subarray Sum | | [Code](Sorting%20and%20Searching/Maximum%20Subarray%20Sum.cpp) |
| ✔ | Stick Lengths | | [Code](Sorting%20and%20Searching/Stick%20Lengths.cpp) |
| ✔ | Missing Coin Sum | | [Code](Sorting%20and%20Searching/Missing%20Coin%20Sum.cpp) |
| ✔ | Collecting Numbers | | [Code](Sorting%20and%20Searching/Collecting%20Numbers.cpp) |
| ✔ | Collecting Numbers II | | [Code](Sorting%20and%20Searching/Collecting%20Numbers%20II.cpp) |
| ✔ | Playlist | | [Code](Sorting%20and%20Searching/Playlist.cpp) |
| ✔ | Towers | | [Code](Sorting%20and%20Searching/Towers.cpp) |
| ✔ | Traffic Lights | | [Code](Sorting%20and%20Searching/Traffic%20Lights.cpp) |
| ✔ | Josephus Problem I | | [Code](Sorting%20and%20Searching/Josephus%20Problem%20I.cpp) |
| ✔ | Josephus Problem II | `OST` | [Code](Sorting%20and%20Searching/Josephus%20Problem%20II.cpp) |
| ✔ | Nested Ranges Check | | [Code](Sorting%20and%20Searching/Nested%20Ranges%20Check.cpp) |
| ✔ | Nested Ranges Count | `Point Update Range Sum` | [Code](Sorting%20and%20Searching/Nested%20Ranges%20Count.cpp) |
| ✔ | Room Allocation | | [Code](Sorting%20and%20Searching/Room%20Allocation.cpp) |
| ✔ | Factory Machines | | [Code](Sorting%20and%20Searching/Factory%20Machines.cpp) |
| ✔ | Tasks and Deadlines | | [Code](Sorting%20and%20Searching/Tasks%20and%20Deadlines.cpp) |
| ✔ | Reading Books | | [Code](Sorting%20and%20Searching/Reading%20Books.cpp) |
| ✔ | Sum of Three Values | | [Code](Sorting%20and%20Searching/Sum%20of%20Three%20Values.cpp) |
| ✔ | Sum of Four Values | | [Code](Sorting%20and%20Searching/Sum%20of%20Four%20Values.cpp) |
| ✔ | Nearest Smaller Values | | [Code](Sorting%20and%20Searching/Nearest%20Smaller%20Values.cpp) |
| ✔ | Subarray Sums I | | [Code](Sorting%20and%20Searching/Subarray%20Sums%20I.cpp) |
| ✔ | Subarray Sums II | | [Code](Sorting%20and%20Searching/Subarray%20Sums%20II.cpp) |
| ✔ | Subarray Divisibility | | [Code](Sorting%20and%20Searching/Subarray%20Divisibility.cpp) |
| ✔ | Subarray Distinct Values | `Two pointers` `Sliding Window` | [Code](Sorting%20and%20Searching/Subarray%20Distinct%20Values.cpp) |
| ✔ | Array Division | | [Code](Sorting%20and%20Searching/Array%20Division.cpp) |
| ✔ | Sliding Median | | [Code](Sorting%20and%20Searching/Sliding%20Median.cpp) |
| ✔ | Sliding Cost | `OST` ``Point Update Range Sum`` | [Code](Sorting%20and%20Searching/Sliding%20Cost.cpp) |
| ✔ | Movie Festival II | `Greedy Scheduling` `Binary Search` | [Code](Sorting%20and%20Searching/Movie%20Festival%20II.cpp) |
| ✔ | Maximum Subarray Sum II | | [Code](Sorting%20and%20Searching/Maximum%20Subarray%20Sum%20II.cpp) |
## Dynamic Programming
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Dice Combinations | `Coin change DP` | [Code](Dynamic%20Programming/Dice%20Combinations.cpp) |
| ✔ | Minimizing Coins | `Coin change DP` | [Code](Dynamic%20Programming/Minimizing%20Coins.cpp) |
| ✔ | Coin Combinations I | `Coin change DP` | [Code](Dynamic%20Programming/Coin%20Combinations%20I.cpp) |
| ✔ | Coin Combinations II | `Coin change DP` | [Code](Dynamic%20Programming/Coin%20Combinations%20II.cpp) |
| ✔ | Removing Digits | | [Code](Dynamic%20Programming/Removing%20Digits.cpp) |
| ✔ | Grid Paths | | [Code](Dynamic%20Programming/Grid%20Paths.cpp) |
| ✔ | Book Shop | | [Code](Dynamic%20Programming/Book%20Shop.cpp) |
| ✔ | Array Description | | [Code](Dynamic%20Programming/Array%20Description.cpp) |
| ✔ | Counting Towers | | [Code](Dynamic%20Programming/Counting%20Towers.cpp) |
| ✔ | Edit Distance | | [Code](Dynamic%20Programming/Edit%20Distance.cpp) |
| ✔ | Rectangle Cutting | | [Code](Dynamic%20Programming/Rectangle%20Cutting.cpp) |
| ✔ | Money Sums | | [Code](Dynamic%20Programming/Money%20Sums.cpp) |
| ✔ | Removal Game | | [Code](Dynamic%20Programming/Removal%20Game.cpp) |
| ✔ | Two Sets II | `Knapsack DP` | [Code](Dynamic%20Programming/Two%20Sets%20II.cpp) |
| ✔ | Increasing Subsequence | `LIS` | [Code](Dynamic%20Programming/Increasing%20Subsequence.cpp) |
| ✔ | Projects | | [Code](Dynamic%20Programming/Projects.cpp) |
| | Elevator Rides | | [Code](Dynamic%20Programming/Elevator%20Rides.cpp) |
| ✔ | Counting Tilings | `Broken Profile DP` `Bitmask` | [Code](Dynamic%20Programming/Counting%20Tilings.cpp) |
| ✔ | Counting Numbers | `Digit Dp` | [Code](Dynamic%20Programming/Counting%20Numbers.cpp) |
## Graph Algorithms
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Counting Rooms | `BFS` | [Code](Graph%20Algorithms/Counting%20Rooms.cpp) |
| ✔ | Labyrinth | `BFS` | [Code](Graph%20Algorithms/Labyrinth.cpp) |
| ✔ | Building Roads | `BFS` `DFS` `Forest Counting` | [Code](Graph%20Algorithms/Building%20Roads.cpp) |
| ✔ | Message Route | `BFS` | [Code](Graph%20Algorithms/Message%20Route.cpp) |
| ✔ | Building Teams | `Bicoloring` `DFS` | [Code](Graph%20Algorithms/Building%20Teams.cpp) |
| ✔ | Round Trip | `Cycle in undirected graph` `DFS` | [Code](Graph%20Algorithms/Round%20Trip.cpp) |
| ✔ | Monsters | `BFS` | [Code](Graph%20Algorithms/Monsters.cpp) |
| ✔ | Shortest Routes I | `Single Source Shortest Path` ` Dijkstra` | [Code](Graph%20Algorithms/Shortest%20Routes%20I.cpp) |
| ✔ | Shortest Routes II | `All Pair Shortes Path` `Floyd Warshall` | [Code](Graph%20Algorithms/Shortest%20Routes%20II.cpp) |
| ✔ | High Score | `Single Source Shortest Path` ` Bellman Ford` | [Code](Graph%20Algorithms/High%20Score.cpp) |
| ✔ | Flight Discount | `Single Source Shortest Path` ` Dijkstra` | [Code](Graph%20Algorithms/Flight%20Discount.cpp) |
| ✔ | Cycle Finding | `Negative Cycle` `Bellman Ford` | [Code](Graph%20Algorithms/Cycle%20Finding.cpp) |
| | Flight Routes | | [Code](Graph%20Algorithms/Flight%20Routes.cpp) |
| ✔ | Round Trip II | `DFS` `Cycle in directed graph` | [Code](Graph%20Algorithms/Round%20Trip%20II.cpp) |
| ✔ | Course Schedule | `Topological Sort` | [Code](Graph%20Algorithms/Course%20Schedule.cpp) |
| ✔ | Longest Flight Route | `Topological Sort` `DP` | [Code](Graph%20Algorithms/Longest%20Flight%20Route.cpp) |
| ✔ | Game Routes | `Topological Sort` `DP` | [Code](Graph%20Algorithms/Game%20Routes.cpp) |
| ✔ | Investigation | `Dijkstra` | [Code](Graph%20Algorithms/Investigation.cpp) |
| ✔ | Planets Queries I | `Binary Lifting` | [Code](Graph%20Algorithms/Planets%20Queries%20I.cpp) |
| | Planets Queries II | | [Code](Graph%20Algorithms/Planets%20Queries%20II.cpp) |
| ✔ | Planets Cycles | `DFS` | [Code](Graph%20Algorithms/Planets%20Cycles.cpp) |
| ✔ | Road Reparation | `Minimum Spanning Tree` `Kruskal` | [Code](Graph%20Algorithms/Road%20Reparation.cpp) |
| ✔ | Road Construction | `DSU` | [Code](Graph%20Algorithms/Road%20Construction.cpp) |
| ✔ | Flight Routes Check | `Strongly Connected Components` | [Code](Graph%20Algorithms/Flight%20Routes%20Check.cpp) |
| ✔ | Planets and Kingdoms | `Strongly Connected Components` | [Code](Graph%20Algorithms/Planets%20and%20Kingdoms.cpp) |
| ✔ | Giant Pizza | `2-SAT` | [Code](Graph%20Algorithms/Giant%20Pizza.cpp) |
| ✔ | Coin Collector | `Condensation Graph` `Topological Sort` `DP` | [Code](Graph%20Algorithms/Coin%20Collector.cpp) |
| ✔ | Mail Delivery | `Euler Tour - Undirected` | [Code](Graph%20Algorithms/Mail%20Delivery.cpp) |
| | De Bruijn Sequence | | [Code](Graph%20Algorithms/De%20Bruijn%20Sequence.cpp) |
| ✔ | Teleporters Path | `Euler Path - Directed` | [Code](Graph%20Algorithms/Teleporters%20Path.cpp) |
| ✔ | Hamiltonian Flights | `Hamiltonian Path` `Bitmask DP` | [Code](Graph%20Algorithms/Hamiltonian%20Flights.cpp) |
| ✔ | Knight's Tour | `Hamiltonian Path` `Heuristics` | [Code](Graph%20Algorithms/Knight's%20Tour.cpp) |
| ✔ | Download Speed | `Max Flow Min Cut` `Push Relabel` `Dinic` | [Code](Graph%20Algorithms/Download%20Speed.cpp) |
| ✔ | Police Chase | `Max Flow Min Cut` `Push Relabel` | [Code](Graph%20Algorithms/Police%20Chase.cpp) |
| ✔ | School Dance | `Max Flow``Bipartite Matching` `Hopkroft Carp` | [Code](Graph%20Algorithms/School%20Dance.cpp) |
| ✔ | Distinct Routes | `Max Flow` `Dinic` `Path reconstruction` | [Code](Graph%20Algorithms/Distinct%20Routes.cpp) |
## Range Queries
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Static Range Sum Queries | | [Code](Range%20Queries/Static%20Range%20Sum%20Queries.cpp) |
| ✔ | Static Range Minimum Queries | | [Code](Range%20Queries/Static%20Range%20Minimum%20Queries.cpp) |
| ✔ | Dynamic Range Sum Queries | | [Code](Range%20Queries/Dynamic%20Range%20Sum%20Queries.cpp) |
| ✔ | Dynamic Range Minimum Queries | | [Code](Range%20Queries/Dynamic%20Range%20Minimum%20Queries.cpp) |
| ✔ | Range Xor Queries | | [Code](Range%20Queries/Range%20Xor%20Queries.cpp) |
| ✔ | Range Update Queries | | [Code](Range%20Queries/Range%20Update%20Queries.cpp) |
| ✔ | Forest Queries | | [Code](Range%20Queries/Forest%20Queries.cpp) |
| ✔ | Hotel Queries | | [Code](Range%20Queries/Hotel%20Queries.cpp) |
| ✔ | List Removals | | [Code](Range%20Queries/List%20Removals.cpp) |
| ✔ | Salary Queries | | [Code](Range%20Queries/Salary%20Queries.cpp) |
| ✔ | Prefix Sum Queries | | [Code](Range%20Queries/Prefix%20Sum%20Queries.cpp) |
| ✔ | Pizzeria Queries | | [Code](Range%20Queries/Pizzeria%20Queries.cpp) |
| ✔ | Subarray Sum Queries | | [Code](Range%20Queries/Subarray%20Sum%20Queries.cpp) |
| ✔ | Distinct Values Queries | | [Code](Range%20Queries/Distinct%20Values%20Queries.cpp) |
| ✔ | Increasing Array Queries | `Segment tree` `Tree walking` | [Code](Range%20Queries/Increasing%20Array%20Queries.cpp) |
| ✔ | Forest Queries II | | [Code](Range%20Queries/Forest%20Queries%20II.cpp) |
| ✔ | Range Updates and Sums | | [Code](Range%20Queries/Range%20Updates%20and%20Sums.cpp) |
| ✔ | Polynomial Queries | `Lazy Segment Tree` | [Code](Range%20Queries/Polynomial%20Queries.cpp) |
| ✔ | Range Queries and Copies | `Persistent Segment Tree` | [Code](Range%20Queries/Range%20Queries%20and%20Copies.cpp) |
## Tree Algorithms
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Subordinates | `Subtree DP` | [Code](Tree%20Algorithms/Subordinates.cpp) |
| ✔ | Tree Matching | `Tree DP` | [Code](Tree%20Algorithms/Tree%20Matching.cpp) |
| ✔ | Tree Diameter | `Tree Diameter` | [Code](Tree%20Algorithms/Tree%20Diameter.cpp) |
| ✔ | Tree Distances I | `Tree Diameter` | [Code](Tree%20Algorithms/Tree%20Distances%20I.cpp) |
| ✔ | Tree Distances II | `Tree Rerooting DP` | [Code](Tree%20Algorithms/Tree%20Distances%20II.cpp) |
| ✔ | Company Queries I | `Binary Lifting` | [Code](Tree%20Algorithms/Company%20Queries%20I.cpp) |
| ✔ | Company Queries II | `LCA` | [Code](Tree%20Algorithms/Company%20Queries%20II.cpp) |
| ✔ | Distance Queries | `LCA` | [Code](Tree%20Algorithms/Distance%20Queries.cpp) |
| ✔ | Counting Paths | `HLD` | [Code](Tree%20Algorithms/Counting%20Paths.cpp) |
| ✔ | Subtree Queries | `HLD` | [Code](Tree%20Algorithms/Subtree%20Queries.cpp) |
| ✔ | Path Queries | `HLD` | [Code](Tree%20Algorithms/Path%20Queries.cpp) |
| ✔ | Path Queries II | `HLD` | [Code](Tree%20Algorithms/Path%20Queries%20II.cpp) |
| ✔ | Distinct Colors | `MO on Tree` / `Sack` `Small to Large` | [Code](Tree%20Algorithms/Distinct%20Colors.cpp) [Code]([Code](Tree%20Algorithms/Distinct%20Colors%20Solution2.cpp)) |
| ✔ | Finding a Centroid | `Centroid` | [Code](Tree%20Algorithms/Finding%20a%20Centroid.cpp) |
| ✔ | Fixed-Length Paths I | `Centroid Decomposition` | [Code](Tree%20Algorithms/Fixed-Length%20Paths%20I.cpp) |
| ✔ | Fixed-Length Paths II | `Centroid Decomposition` | [Code](Tree%20Algorithms/Fixed-Length%20Paths%20II.cpp) |
## Mathematics
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Josephus Queries | | [Code](Mathematics/Josephus%20Queries.cpp) |
| ✔ | Exponentiation | | [Code](Mathematics/Exponentiation.cpp) |
| ✔ | Exponentiation II | | [Code](Mathematics/Exponentiation%20II.cpp) |
| ✔ | Counting Divisors | | [Code](Mathematics/Counting%20Divisors.cpp) |
| ✔ | Common Divisors | | [Code](Mathematics/Common%20Divisors.cpp) |
| ✔ | Sum of Divisors | | [Code](Mathematics/Sum%20of%20Divisors.cpp) |
| ✔ | Divisor Analysis | | [Code](Mathematics/Divisor%20Analysis.cpp) |
| ✔ | Prime Multiples | | [Code](Mathematics/Prime%20Multiples.cpp) |
| ✔ | Counting Coprime Pairs | | [Code](Mathematics/Counting%20Coprime%20Pairs.cpp) |
| ✔ | Binomial Coefficients | | [Code](Mathematics/Binomial%20Coefficients.cpp) |
| ✔ | Creating Strings II | | [Code](Mathematics/Creating%20Strings%20II.cpp) |
| ✔ | Distributing Apples | | [Code](Mathematics/Distributing%20Apples.cpp) |
| ✔ | Christmas Party | | [Code](Mathematics/Christmas%20Party.cpp) |
| ✔ | Bracket Sequences I | | [Code](Mathematics/Bracket%20Sequences%20I.cpp) |
| ✔ | Bracket Sequences II | | [Code](Mathematics/Bracket%20Sequences%20II.cpp) |
| ✔ | Counting Necklaces | | [Code](Mathematics/Counting%20Necklaces.cpp) |
| ✔ | Counting Grids | | [Code](Mathematics/Counting%20Grids.cpp) |
| ✔ | Fibonacci Numbers | | [Code](Mathematics/Fibonacci%20Numbers.cpp) |
| ✔ | Throwing Dice | | [Code](Mathematics/Throwing%20Dice.cpp) |
| ✔ | Graph Paths I | | [Code](Mathematics/Graph%20Paths%20I.cpp) |
| ✔ | Graph Paths II | | [Code](Mathematics/Graph%20Paths%20II.cpp) |
| ✔ | Dice Probability | | [Code](Mathematics/Dice%20Probability.cpp) |
| | Moving Robots | | [Code](Mathematics/Moving%20Robots.cpp) |
| ✔ | Candy Lottery | `Expected Value` | [Code](Mathematics/Candy%20Lottery.cpp) |
| | Inversion Probability | | [Code](Mathematics/Inversion%20Probability.cpp) |
| ✔ | Stick Game | | [Code](Mathematics/Stick%20Game.cpp) |
| ✔ | Nim Game I | | [Code](Mathematics/Nim%20Game%20I.cpp) |
| ✔ | Nim Game II | | [Code](Mathematics/Nim%20Game%20II.cpp) |
| ✔ | Stair Game | | [Code](Mathematics/Stair%20Game.cpp) |
| ✔ | Grundy's Game | | [Code](Mathematics/Grundy's%20Game.cpp) |
| ✔ | Another Game | | [Code](Mathematics/Another%20Game.cpp) |
## String Algorithms
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Word Combinations | `Trie` `DP` | [Code](String%20Algorithms/Word%20Combinations.cpp) |
| ✔ | String Matching | `Suffix array` / `Hashing` | [Code](String%20Algorithms/String%20Matching.cpp) |
| ✔ | Finding Borders | `Z function` `Prefix function` / `Hashing` | [Code](String%20Algorithms/Finding%20Borders.cpp) |
| ✔ | Finding Periods | `Z function` `Prefix function` / `Hashing` | [Code](String%20Algorithms/Finding%20Periods.cpp) |
| ✔ | Minimal Rotation | `Suffix Automata` | [Code](String%20Algorithms/Minimal%20Rotation.cpp) |
| ✔ | Longest Palindrome | `Manacher` | [Code](String%20Algorithms/Longest%20Palindrome.cpp) |
| | Required Substring | | [Code](String%20Algorithms/Required%20Substring.cpp) |
| ✔ | Palindrome Queries | `Range Sum` `Hashing` | [Code](String%20Algorithms/Palindrome%20Queries.cpp) |
| ✔ | Finding Patterns | | [Code](String%20Algorithms/Finding%20Patterns.cpp) |
| ✔ | Counting Patterns | | [Code](String%20Algorithms/Counting%20Patterns.cpp) |
| ✔ | Pattern Positions | | [Code](String%20Algorithms/Pattern%20Positions.cpp) |
| ✔ | Distinct Substrings | | [Code](String%20Algorithms/Distinct%20Substrings.cpp) |
| ✔ | Repeating Substring | `Hashing` `Binary Search` | [Code](String%20Algorithms/Repeating%20Substring.cpp) |
| ✔ | String Functions | | [Code](String%20Algorithms/String%20Functions.cpp) |
| ✔ | Substring Order I | | [Code](String%20Algorithms/Substring%20Order%20I.cpp) |
| ✔ | Substring Order II | | [Code](String%20Algorithms/Substring%20Order%20II.cpp) |
| ✔ | Substring Distribution | `Suffix Array` `Longest Common Prefix` | [Code](String%20Algorithms/Substring%20Distribution.cpp) |
## Geometry
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Point Location Test | | [Code](Geometry/Point%20Location%20Test.cpp) |
| ✔ | Line Segment Intersection | | [Code](Geometry/Line%20Segment%20Intersection.cpp) |
| ✔ | Polygon Area | | [Code](Geometry/Polygon%20Area.cpp) |
| ✔ | Point in Polygon | | [Code](Geometry/Point%20in%20Polygon.cpp) |
| ✔ | Polygon Lattice Points | | [Code](Geometry/Polygon%20Lattice%20Points.cpp) |
| ✔ | Minimum Euclidean Distance | | [Code](Geometry/Minimum%20Euclidean%20Distance.cpp) |
| ✔ | Convex Hull | | [Code](Geometry/Convex%20Hull.cpp) |
## Advanced Techniques
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Meet in the Middle | | [Code](Advanced%20Techniques/Meet%20in%20the%20Middle.cpp) |
| ✔ | Hamming Distance | | [Code](Advanced%20Techniques/Hamming%20Distance.cpp) |
| ✔ | Beautiful Subgrids | `Bitset` | [Code](Advanced%20Techniques/Beautiful%20Subgrids.cpp) |
| ✔ | Reachable Nodes | | [Code](Advanced%20Techniques/Reachable%20Nodes.cpp) |
| ✔ | Reachability Queries | | [Code](Advanced%20Techniques/Reachability%20Queries.cpp) |
| ✔ | Cut and Paste | `Implicit Treap` | [Code](Advanced%20Techniques/Cut%20and%20Paste.cpp) |
| ✔ | Substring Reversals | `Implicit Treap` | [Code](Advanced%20Techniques/Substring%20Reversals.cpp) |
| ✔ | Reversals and Sums | `Implicit Treap` | [Code](Advanced%20Techniques/Reversals%20and%20Sums.cpp) |
| ✔ | Necessary Roads | `Bridges` | [Code](Advanced%20Techniques/Necessary%20Roads.cpp) |
| ✔ | Necessary Cities | `Articulation Points` | [Code](Advanced%20Techniques/Necessary%20Cities.cpp) |
| | Eulerian Subgraphs | | [Code](Advanced%20Techniques/Eulerian%20Subgraphs.cpp) |
| ✔ | Monster Game I | `DP` `Convex Hull Optimization` | [Code](Advanced%20Techniques/Monster%20Game%20I.cpp) |
| ✔ | Monster Game II | `DP` `Convex Hull Optimization` | [Code](Advanced%20Techniques/Monster%20Game%20II.cpp) |
| ✔ | Subarray Squares | `DP` `Convex Hull Optimization` | [Code](Advanced%20Techniques/Subarray%20Squares.cpp) |
| | Houses and Schools | | [Code](Advanced%20Techniques/Houses%20and%20Schools.cpp) |
| ✔ | Knuth Division | `DP` `Knuth Optimization` | [Code](Advanced%20Techniques/Knuth%20Division.cpp) |
| ✔ | Apples and Bananas | `FFT` | [Code](Advanced%20Techniques/Apples%20and%20Bananas.cpp) |
| ✔ | One Bit Positions | `FFT` | [Code](Advanced%20Techniques/One%20Bit%20Positions.cpp) |
| ✔ | Signal Processing | `FFT` | [Code](Advanced%20Techniques/Signal%20Processing.cpp) |
| ✔ | New Roads Queries | `HLD` | [Code](Advanced%20Techniques/New%20Roads%20Queries.cpp) |
| ✔ | Dynamic Connectivity | `Dynamic DSU` | [Code](Advanced%20Techniques/Dynamic%20Connectivity.cpp) |
| ✔ | Parcel Delivery | `Max Flow Min Cost` `Fixed flow` | [Code](Advanced%20Techniques/Parcel%20Delivery.cpp) |
| ✔ | Task Assignment | `Max Flow Min Cost` | [Code](Advanced%20Techniques/Task%20Assignment.cpp) |
| ✔ | Distinct Routes II | `Max Flow Min Cost` `Path reconstruction` | [Code](Advanced%20Techniques/Distinct%20Routes%20II.cpp) |
## Additional Problems
| Status | Name | Tags | Link |
| ---- | ---- | ---- | ---- |
| ✔ | Shortest Subsequence | | [Code](Additional%20Problems/Shortest%20Subsequence.cpp) |
| ✔ | Counting Bits | | [Code](Additional%20Problems/Counting%20Bits.cpp) |
| ✔ | Swap Game | | [Code](Additional%20Problems/Swap%20Game.cpp) |
| ✔ | Prüfer Code | `Prüfer Code` | [Code](Additional%20Problems/Prüfer%20Code.cpp) |
| ✔ | Acyclic Graph Edges | | [Code](Additional%20Problems/Acyclic%20Graph%20Edges.cpp) |
| ✔ | Strongly Connected Edges | `Bridge` | [Code](Additional%20Problems/Strongly%20Connected%20Edges.cpp) |
| | Even Outdegree Edges | | [Code](Additional%20Problems/Even%20Outdegree%20Edges.cpp) |
| ✔ | Multiplication Table | `Binary Search` `Harmonic Progression` | [Code](Additional%20Problems/Multiplication%20Table.cpp) |
| ✔ | Advertisement | `Segment Tree` | [Code](Additional%20Problems/Advertisement.cpp) |
| ✔ | Special Substrings | `Constructive` `Hashing` | [Code](Additional%20Problems/Special%20Substrings.cpp) |
| | Permutation Inversions | | [Code](Additional%20Problems/Permutation%20Inversions.cpp) |
| ✔ | Maximum Xor Subarray | `Trie` `Divide and Conquer` | [Code](Additional%20Problems/Maximum%20Xor%20Subarray.cpp) |
| ✔ | Movie Festival Queries | `Greedy Scheduling` `RMQ` `Binary Lifting` | [Code](Additional%20Problems/Movie%20Festival%20Queries.cpp) |
| ✔ | Chess Tournament | `Greedy` | [Code](Additional%20Problems/Chess%20Tournament.cpp) |
| ✔ | Tree Traversals | | [Code](Additional%20Problems/Tree%20Traversals.cpp) |
| ✔ | Network Renovation | `Euler Tour` | [Code](Additional%20Problems/Network%20Renovation.cpp) |
| ✔ | Graph Girth | `BFS Tree` | [Code](Additional%20Problems/Graph%20Girth.cpp) |
| ✔ | Intersection Points | `Range Query with Sweep Line` | [Code](Additional%20Problems/Intersection%20Points.cpp) |
| ✔ | Inverse Inversions | | [Code](Additional%20Problems/Inverse%20Inversions.cpp) |
| | Monotone Subsequences | | [Code](Additional%20Problems/Monotone%20Subsequences.cpp) |
| | String Reorder | | [Code](Additional%20Problems/String%20Reorder.cpp) |
| | Stack Weights | | [Code](Additional%20Problems/Stack%20Weights.cpp) |
| | Pyramid Array | | [Code](Additional%20Problems/Pyramid%20Array.cpp) |
| ✔ | Increasing Subsequence II | | [Code](Additional%20Problems/Increasing%20Subsequence%20II.cpp) |
| ✔ | String Removals | `DP` `Cumulative sum` | [Code](Additional%20Problems/String%20Removals.cpp) |
| ✔ | Bit Inversions | | [Code](Additional%20Problems/Bit%20Inversions.cpp) |
| ✔ | Xor Pyramid | | [Code](Additional%20Problems/Xor%20Pyramid.cpp) |
| ✔ | Writing Numbers | | [Code](Additional%20Problems/Writing%20Numbers.cpp) |
| ✔ | String Transform | `Inverse Burrows Wheeler Transform` | [Code](Additional%20Problems/String%20Transform.cpp) |
| | Letter Pair Move Game | | [Code](Additional%20Problems/Letter%20Pair%20Move%20Game.cpp) |
| ✔ | Maximum Building I | `Segment Tree` | [Code](Additional%20Problems/Maximum%20Building%20I.cpp) |
| | Sorting Methods | | [Code](Additional%20Problems/Sorting%20Methods.cpp) |
| ✔ | Cyclic Array | `Binary Search` `Greedy` | [Code](Additional%20Problems/Cyclic%20Array.cpp) |
| | List of Sums | | [Code](Additional%20Problems/List%20of%20Sums.cpp) |
| | Increasing Array II | | [Code](Additional%20Problems/Increasing%20Array%20II.cpp) |
| | Food Division | | [Code](Additional%20Problems/Food%20Division.cpp) |
| ✔ | Bit Problem | `SOS DP` | [Code](Additional%20Problems/Bit%20Problem.cpp) |
| | Swap Round Sorting | | [Code](Additional%20Problems/Swap%20Round%20Sorting.cpp) |
| | Binary Subsequences | | [Code](Additional%20Problems/Binary%20Subsequences.cpp) |
| ✔ | Tree Isomorphism I | `Tree Isomorphism` `rooted` | [Code](Additional%20Problems/Tree%20Isomorphism%20I.cpp) |
| ✔ | Counting Sequences | `Inclusion Exclusion Principle` | [Code](Additional%20Problems/Counting%20Sequences.cpp) |
| ✔ | Critical Cities | `Dominator Tree` | [Code](Additional%20Problems/Critical%20Cities.cpp) |
| ✔ | School Excursion | `Knapsack DP` `Bitset` | [Code](Additional%20Problems/School%20Excursion.cpp) |
| | Coin Grid | | [Code](Additional%20Problems/Coin%20Grid.cpp) |
| | Robot Path | | [Code](Additional%20Problems/Robot%20Path.cpp) |
| | Programmers and Artists | | [Code](Additional%20Problems/Programmers%20and%20Artists.cpp) |
| | Course Schedule II | | [Code](Additional%20Problems/Course%20Schedule%20II.cpp) |
| | Removing Digits II | | [Code](Additional%20Problems/Removing%20Digits%20II.cpp) |
| | Coin Arrangement | | [Code](Additional%20Problems/Coin%20Arrangement.cpp) |
| | Counting Bishops | | [Code](Additional%20Problems/Counting%20Bishops.cpp) |
| ✔ | Grid Puzzle I | `Max Flow Min Cut` | [Code](Additional%20Problems/Grid%20Puzzle%20I.cpp) |
| ✔ | Grid Puzzle II | `Max Flow Max Cost` | [Code](Additional%20Problems/Grid%20Puzzle%20II.cpp) |
| | Empty String | | [Code](Additional%20Problems/Empty%20String.cpp) |
| ✔ | Grid Paths | `DP` `Inclusion Exclusion Principle` | [Code](Additional%20Problems/Grid%20Paths.cpp) |
| ✔ | Bit Substrings | `FFT` | [Code](Additional%20Problems/Bit%20Substrings.cpp) |
| ✔ | Reversal Sorting | `Implicit Treap` | [Code](Additional%20Problems/Reversal%20Sorting.cpp) |
| | Counting Reorders | | [Code](Additional%20Problems/Counting%20Reorders.cpp) |
| | Book Shop II | | [Code](Additional%20Problems/Book%20Shop%20II.cpp) |
| ✔ | Network Breakdown | `DSU with rollback` | [Code](Additional%20Problems/Network%20Breakdown.cpp) |
| | Visiting Cities | | [Code](Additional%20Problems/Visiting%20Cities.cpp) |
| | Missing Coin Sum Queries | | [Code](Additional%20Problems/Missing%20Coin%20Sum%20Queries.cpp) |
| ✔ | Number Grid | `Constructive` | [Code](Additional%20Problems/Number%20Grid.cpp) |
| | Maximum Building II | | [Code](Additional%20Problems/Maximum%20Building%20II.cpp) |
| | Filling Trominos | | [Code](Additional%20Problems/Filling%20Trominos.cpp) |
| ✔ | Stick Divisions | `Huffman Coding` `greedy` | [Code](Additional%20Problems/Stick%20Divisions.cpp) |
| ✔ | Coding Company | `Open and Close Interval DP` | [Code](Additional%20Problems/Coding%20Company.cpp) |
| | Flight Route Requests | | [Code](Additional%20Problems/Flight%20Route%20Requests.cpp) |
| | Two Stacks Sorting | | [Code](Additional%20Problems/Two%20Stacks%20Sorting.cpp) |
| ✔ | Tree Isomorphism II | `Tree Isomorphism` `unrooted` | [Code](Additional%20Problems/Tree%20Isomorphism%20II.cpp) |
| ✔ | Forbidden Cities | `Block Cut Tree` | [Code](Additional%20Problems/Forbidden%20Cities.cpp) |
| ✔ | Area of Rectangles | `Range Query and Update with Sweep Line` | [Code](Additional%20Problems/Area%20of%20Rectangles.cpp) |
| | Grid Completion | | [Code](Additional%20Problems/Grid%20Completion.cpp) |
| | Creating Offices | | [Code](Additional%20Problems/Creating%20Offices.cpp) |
| ✔ | Permutations II | `Connected Component DP` | [Code](Additional%20Problems/Permutations%20II.cpp) |
| | Functional Graph Distribution | | [Code](Additional%20Problems/Functional%20Graph%20Distribution.cpp) |
| | New Flight Routes | | [Code](Additional%20Problems/New%20Flight%20Routes.cpp) |
| | Grid Path Construction | | [Code](Additional%20Problems/Grid%20Path%20Construction.cpp) |