โ† Amazon questions

Find Maximum Average in n-ary Tree

Filed under Amazon

Given the root of an n-ary tree, find the subtree with the maximum average value (sum of node values in subtree / number of nodes in subtree) and return that average.

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 Amazon questions

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