You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Given a binary tree. Print the zig zag order i.e print level 1 from left to right, level 2 from right to left and so on. This means odd levels should get printed from left to right and even levels should be printed from right to left.
7
+
8
+
// Input Format
9
+
// Enter the values of all the nodes in the binary tree in pre-order format where true suggest the node exists and false suggests it is NULL
10
+
11
+
// Constraints
12
+
// None
13
+
14
+
// Output Format
15
+
// Display the values in zigzag level order in which each value is separated by a space
0 commit comments