AmazonCoding·30 minMembers
Print Hierarchical Comments
Members only
Given a flat array of comment maps containing comment ID, parent-comment ID, and text, print every comment in hierarchical order. Nesting may be arbitrarily deep.
SWE
tree
hashmap
dfs
medium
Frequency
Single report
Last asked
2026-08-22
Stage
onsite-coding
Log in to continue reading the full content
Comments
Sign in to join the discussion
Loading...
