Wednesday, January 7, 2015

[LeetCode]Binary Zigzag Level Order Traversal



偶数层从左往右,奇数层从右往左,最后注意一下children的顺序就行。

代码如下:

iterative



recursive

No comments:

Post a Comment