Binary Tree Level Order
Trung bình🏗️ Cấu trúc dữ liệu 5000ms 256MB
Binary Tree Level Order
Đề bài
Duyệt cây theo từng tầng.
Ví dụ
Ví dụ 1:
Input: [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]
Ràng buộc
- Dữ liệu đầu vào luôn hợp lệ
Case 1
Input = [3,9,20,null,null,15,7]
Output = [[3],[9,20],[15,7]]