This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingSum the values of keys sharing a prefix, with values updating.
What this asks
Sum the values of keys that share a prefix, while keys keep being inserted.
A prefix query sums the subtree; keeping running sums at every node above a key makes both operations one walk.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing