QUIZ: CF_W27
◀ BACK WEEK 27
5 QUESTIONS
Q1 1 / 5 medium
Heavy-Light Decomposition (HLD)

Given a tree of n nodes with values, support two operations: (1) update the value of a node, (2) query the maximum value on the path between two nodes. Both in O(log² n).

What is the key idea behind HLD?