Saturday, April 13, 2019

Spiral Order Traversal of a Tree [Binary Tree Zigzag Level Order Traversal]

Problem statement:
Write a function to print spiral order traversal of a tree. 
For example.

Input - 
10
J
H
I
A
C
D
F
E
B
G
where 10 is the number of elements in the input array.

Output -
A
BC
FED
GHIJ

No comments:

Post a Comment

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...