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).
zigzag层序遍历树
For example:
Given binary...
分类:
其他好文 时间:
2014-08-09 23:19:59
阅读次数:
363
Binary Tree Zigzag Level Order TraversalGiven a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then...
分类:
其他好文 时间:
2014-08-08 23:48:36
阅读次数:
307
题目:
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...
分类:
其他好文 时间:
2014-08-06 14:59:41
阅读次数:
307
题目: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 ....
分类:
编程语言 时间:
2014-08-05 05:17:38
阅读次数:
311
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 ...
分类:
其他好文 时间:
2014-08-05 00:18:28
阅读次数:
225
题目: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 f....
分类:
编程语言 时间:
2014-08-04 10:47:57
阅读次数:
222
Problem Description:
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)...
分类:
其他好文 时间:
2014-08-01 00:11:50
阅读次数:
285
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:
其他好文 时间:
2014-07-27 22:03:49
阅读次数:
214
ZigZag ConversionThe string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern i...
分类:
其他好文 时间:
2014-07-24 09:51:13
阅读次数:
244
Nothing to hard to think. Just take care of boundary conditions.class Solution {public: string convert(string s, int nRows) { if(s.empty() |...
分类:
其他好文 时间:
2014-07-23 15:04:36
阅读次数:
227