Discover Packages
github.com/openset/leetcode
problems
binary-tree-zigzag-level-order-traversal
package
Version:
v1.5.0
Opens a new window with list of versions in this module.
Published: Nov 25, 2019
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
< Previous
Next >
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).
For example:
Given binary tree [3,9,20,null,null,15,7]
,
3
/ \
9 20
/ \
15 7
return its zigzag level order traversal as:
[
[3],
[20,9],
[15,7]
]
[Stack ]
[Tree ]
[Breadth-first Search ]
Similar Questions
Binary Tree Level Order Traversal (Medium)
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.