Problem
Given the root of a binary tree, return the node values grouped by level from top to bottom and left to right. If the tree is empty, return an empty list.
Constraints
- 0 <= number of nodes <= 2000
- -1000 <= Node.val <= 1000
- The input tree is a valid binary tree
Practicing as: AI Engineer interview at FujitsuHi, I'll play your Fujitsu interviewer for the AI Engineer role. Candidates describe these interviews as mostly positive and moderately difficult, so expect me to be friendly and conversational. Take your time with the question above and answer like we're in the room.
You are practicing as a guest. Sign up free to run your code against the sample data. Your draft stays right here.



