🌳 Tree DP — Maximum Independent Set Full Demo
Tree DP O(N) Step 0/11
📊 Tree Structure (node=id(val), blue brackets=[dp0,dp1])
🗂 DP State
dp[u][0]=skip u, dp[u][1]=select u
DFS Call Stack
Time: O(N)
Space: O(N)
💻 Code
HintClick Next Step ▶ to start and observe how post-order DFS computes dp values from leaves to root.
0/11

Keyboard: Next   Prev   R Reset