思路一:类似103 Binary Tree Zigzag 的思路,只不过要注意最后边的node有时候是zigzag层的最后一个,有时候是zigzag层的第一个。 ...
分类:
其他好文 时间:
2017-01-26 08:31:37
阅读次数:
150
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 ...
分类:
其他好文 时间:
2017-01-25 23:05:41
阅读次数:
206
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 ...
分类:
其他好文 时间:
2017-01-25 07:42:01
阅读次数:
179
#include<iostream> #include<vector> #include<string> void main() { using namespace std; class Solution { public: string convert(string s, int numRows) ...
分类:
其他好文 时间:
2016-12-29 07:42:05
阅读次数:
142
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 ...
分类:
其他好文 时间:
2016-11-15 23:23:54
阅读次数:
226
这道题就是简单的处理字符,通过观察计算就可以得出每个重复字符组的长度为2×numRows-2,然后直接处理就行 ...
分类:
其他好文 时间:
2016-11-10 03:05:07
阅读次数:
204
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 ...
分类:
其他好文 时间:
2016-11-05 02:29:09
阅读次数:
220
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 ...
分类:
其他好文 时间:
2016-10-28 22:38:29
阅读次数:
145
最近在看八股文。整理了一下思路,想深入了解还得多去写,无奈时间紧迫的情况下抛砖引玉也不失为下策: 1.Two Sum Easy 给出一个数组,找出其中两个和为目标值的坐标。思路: [1]排序。 和为目标值,一般的思路是先排序,然后取两点坐标分别从首尾向中间移动。若和为目标值则返回两点坐标。若和大于目 ...
分类:
编程语言 时间:
2016-10-22 14:48:35
阅读次数:
171