New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
LinkedIn
Coding Question
AI Insights
Quick Summary
Simulate day-by-day removal of all current leaf nodes from an N-ary tree.
Nodes that become leaves after previous removals are removed in subsequent iterations.
Return a nested list grouping node values by the day they are removed.
What This Tests
Tree traversal and recursive decomposition
Bottom-up dynamic programming on trees
Level or depth assignment from leaves to root
Handling variable-degree graph structures
Common Patterns
DFS/BFS
Dynamic Programming
Graph Traversal
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Stdout
-