A repository to get started with open source and contribute in Hacktoberfest . You can add any data structures and algorithms code in the language of your choice.
Zig Zag Traversal: Given the root of a binary tree, returns 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: [ [3], [20,9], [15,7] ]
Zig Zag Traversal: Given the root of a binary tree, returns 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: [ [3], [20,9], [15,7] ]