Point update: one path down, recompute on the way up

Example:

Input array arr (0-indexed)

Flat tree array tree (1-indexed, heap layout: children of cur at 2·cur and 2·cur+1)

untouched current node on the path, sum stale written / recomputed