Graph Theory37 sections · 1633 units
Open in Course

Update Types

(Point vs range updates)

Point update on node vv: update position tin[v] in the flattened array. This is a single-point update in your segment tree or BIT. Range update on subtree: update range [tin[v], tout[v]].

If your segment tree supports lazy propagation, this is O(logn)O(\log n). Path updates (root to vv) with entry-exit trick: update positions tin[v] and tout[v] with add/subtract values.

Space complexity is O(n)O(n) for the data structures used.