This problem extends level-order traversal by requiring you to identify specific nodes per level, reinforcing the BFS template.
Enable JavaScript for the full StreamPrep guide.