https://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
iven 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,#,#,15,7}
,
3 / \ 9 20 / \ 15 7
return its zigzag level order traversal as:
[ [3], [20,9], [15,7] ]
'풀어본 Algorithm 문제 정리' 카테고리의 다른 글
[OJ.leetcode] jump-game (1) | 2014.08.13 |
---|---|
[OJ.leetcode] merge-sorted-array (1) | 2014.08.02 |
[OJ.leetcode] graycode (1) | 2014.07.30 |
[OJ.leetcode] maximum-subarray (1) | 2014.07.28 |
[Oj.leetcode] swap-nodes-in-pair (0) | 2014.07.27 |