Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 465 Bytes

File metadata and controls

13 lines (9 loc) · 465 Bytes

ZigZag-Level-Order-Traversal-Binary-Tree

Problem Description Given a binary tree, return the zigzag level order traversal of its nodes values. (ie, from left to right, then right to left for the next level and alternate between).

Problem Constraints 1 <= number of nodes <= 105

Input Format First and only argument is root node of the binary tree, A.

Output Format Return a 2D integer array denoting the zigzag level order traversal of the given binary tree.