Pergunta de entrevista da empresa Nextdoor

Flatten a binary tree and then print out the node IDs of a "CommentNode Tree" in depth based format.