</>OfferRetriever
DashboardDiscuss
NEW

Halloween Sale

Unlock all premium questions for over 30% off

$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Amazon Questions

Compress Nodes In N-ary Tree

Medium

Question

The input is an n-ary tree whose node values are all unique, together with a list compressedNodes. Every node named in that list must be compressed. To compress a node, delete it and hand its children to its parent: they take the deleted node's position among the parent's children, in their original order. compressedNodes never names the root. Return the root of the tree that results. ...

Asked at:AmazonMetaMicrosoft

More Amazon interview questions

All Amazon interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.