New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Coding Question
AI Insights
Quick Summary
Remove specified nodes from an N-ary tree while promoting their children to the deleted node's parent.
Calculate the maximum height defined as the longest root-to-leaf path measured in kept nodes.
Root remains intact, and deletion effectively skips depth accumulation for removed nodes.
What This Tests
Recursive tree traversal with state propagation
Efficient filtering using hash-based lookups
Dynamic programming principles applied to tree paths
Simulating structural changes without actual memory reallocation
Common Patterns
DFS/BFS
Dynamic Programming
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
2.8k
/3.7k
Acceptance Rate
73.9%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Stdout
-