Problem
Given theroot of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level).
Examples
Constraints
- The number of nodes in the tree is in the range [0, 2000]
- -1000 <= Node.val <= 1000
Tested Python solution for LeetCode 102 with 13 pytest cases. Generate a practice environment with lcpy.
root of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level).