Binary Tree Traversal - Zigzag Level Order Traversal

Problem Given the 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). Example Example 1 Tree Traversal Direction 3 -> / \ 9 20 <- / \ 15 7 -> ...

ZigZag Conversion Problem

Problem The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R ...

This site uses cookies to improve your experience on our website. By using and continuing to navigate this website, you accept this. Privacy Policy