← Sprinklr questions

Subtree sum and point update queries on a tree

Filed under Sprinklr

The question

Given a tree of n nodes rooted at node r with node values, process two types of queries: (1) calculate the sum of values in the subtree rooted at node i, and (2) add value k to node i.

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

Related Sprinklr questions

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