Concepts2
⚙️AlgorithmIntermediate
DP on Trees
DP on trees is a technique that computes answers for each node by combining results from its children using a post-order DFS.
#tree dp#post-order dfs#rerooting+12
🗂️Data StructureIntermediate
Segment Tree with Lazy Propagation
A segment tree with lazy propagation supports fast range updates and range queries in O(\log n) time.
#segment tree#lazy propagation#range update+12