โ† Directi questions

Tree operations and subtree queries

Filed under Directi

The question

Given a rooted tree where parent labels are smaller than child labels, implement operations to add values to nodes (ADD) or add values to a node and all its ancestors up to the root (ADDUP). Also, answer queries for node values (VAL) and subtree sums (VALTREE).

No write-up yet. Related questions below have one.

Related Directi questions

Collected from public candidate posts and coding forums. Updated Nov 2026.