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
Roblox
Coding Question
AI Insights
Quick Summary
Traverse two N-ary trees representing HTML-like label structures.
Extract leaf node text values in strict top-to-bottom order.
Concatenate extracted texts and compare for equality between both trees.
What This Tests
Iterative tree traversal using explicit stacks
Preserving hierarchical ordering during traversal
Efficient string concatenation and comparison
Handling nested data structures with variable branching factors
Common Patterns
DFS/BFS
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
-