NTHU-CP/NTHU-CPP

Add Heavy Light Decomposition

Opened this issue · 0 comments

WeakGT commented
  • Introduce to Heavy Light Decomposition

    • Intro
    • Definition of Heavy Node and Light Node
  • Properties

    • All nodes belong to a heavy chain
    • Complete Decomposition
    • dfs time stamp is continuous
  • Implementation

    • dfs first time to record father, deep, size, heavy node
    • dfs second time to construct heavy chain and light chain
    • Build data structures on each heavy chain
    • Queries
    • Definition of variables and code
  • Prove the time complexity

  • Problems

  • Reference