[Java][LeetCode][BFS] Binary Tree Zigzag Level Order Traversa #103
root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between).
Input: root = [3,9,20,null,null,15,7]
output is dependent on Layer, so this problem is BFS. I need to output order and reverse order alternate. When this term is reverse order, I need to reverser list. The first time, I had wrong direction. I think is InOrder and PostOrder alternate.
This code include Test Suit at LeetCode.