← OYO questions

Sum of n-ary tree node values after capping child values by parent

Filed under OYO

Given an acyclic n-ary tree where each node holds a numeric value, traverse all child nodes and cap each child's value so it does not exceed its parent's value. If a child's value is already smaller…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related OYO questions

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