Path Queries 1 , could be solved using Tree flattening and Segment tree . The basic idea is that change in value of node 's' changes only the values of all nodes in its subtree , so we can use range update , po
Forest Queries II Range Updates and Sums Polynomial Queries Range Queries and Copies Tree Algorithms Subordinates Tree Matching Tree Diameter Tree Distances I Tree Distances II Company Queries I Company Queries II Distance Queries Counting Paths Subtree Queries Path Queries Path Queries II Distinct Colors...
✔ Path Queries HLD Code ✔ Path Queries II HLD Code ✔ Distinct Colors MO on Tree / Sack Small to Large Code Code ✔ Finding a Centroid Centroid Code ✔ Fixed-Length Paths I Centroid Decomposition Code ✔ Fixed-Length Paths II Centroid Decomposition Code Mathematics StatusNameTagsLink...
2429 - Grid Completion 1752 - Creating Offices 1075 - Permutations II 2415 - Functional Graph Distribution 1685 - New Flight Routes 2418 - Grid Path Construction Releases No releases published Packages No packages published Languages C++97.8% CMake2.2%...
Digit Queries Grid Paths Sorting and Searching Distinct Numbers Apartments Ferris Wheel Concert Tickets Restaurant Customers Movie Festival Sum of Two Values Maximum Subarray Sum Stick Lengths Missing Coin Sum Collecting Numbers Collecting Numbers II ...
Range Queries19/19 Tree Algorithms16/16 Mathematics31/31 String Algorithms17/17 Geometry7/7 Advanced Techniques24/24 Additional Problems65/77 Total288/300 Table of Contents Introductory Problems Sorting and Searching Dynamic Programming Tree Algorithms ...