🎓How I Study AIHISA
📖Read
📄Papers📰Blogs🎬Courses
💡Learn
🛤️Paths📚Topics💡Concepts🎴Shorts
🎯Practice
🧩Problems🎯Prompts🧠Review
Search

Concepts4

Category

🔷All∑Math⚙️Algo🗂️DS📚Theory

Level

AllBeginnerIntermediateAdvanced
Filtering by:
#subtree queries
⚙️AlgorithmAdvanced

DSU on Tree (Sack)

DSU on Tree (also called the Sack technique) answers many subtree queries in O(n \log n) by keeping data from the heavy child and temporarily re-adding light subtrees.

#dsu on tree#sack technique#subtree queries+12
⚙️AlgorithmIntermediate

DFS - Tree and Graph Properties

Depth-First Search (DFS) assigns each vertex a discovery time and a finish time that capture a neat nesting structure of recursion.

#dfs#timestamps#discovery time+11
🗂️Data StructureAdvanced

Euler Tour Tree

An Euler Tour Tree represents each rooted tree as a DFS open/close sequence so that every subtree is a single contiguous interval.

#euler tour tree#implicit treap#dynamic forest+11
🗂️Data StructureAdvanced

Heavy-Light Decomposition

Heavy-Light Decomposition (HLD) breaks a tree into O(n) disjoint chains so that any root-to-node path crosses only O(log n) chains.

#heavy light decomposition#hld c++#segment tree on tree+10