码迷,mamicode.com
首页 >  
搜索关键字:zigzag    ( 480个结果
Leetcode 199. Binary Tree Right Side View
思路一:类似103 Binary Tree Zigzag 的思路,只不过要注意最后边的node有时候是zigzag层的最后一个,有时候是zigzag层的第一个。 ...
分类:其他好文   时间:2017-01-26 08:31:37    阅读次数:150
Binary Tree Zigzag Level Order Traversal
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
Leetcode 103. Binary Tree Zigzag Level Order Traversal
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
Leetcode_实现zigzag的转换_20161228
#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
103. Binary Tree Zigzag Level Order Traversal (Tree, Queue; BFS)
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
Leetcode--ZigZag Conversion
这道题就是简单的处理字符,通过观察计算就可以得出每个重复字符组的长度为2×numRows-2,然后直接处理就行 ...
分类:其他好文   时间:2016-11-10 03:05:07    阅读次数:204
LeetCode103 Binary Tree Zigzag Level Order Traversal
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
LeetCode 6. ZigZag Conversion
...
分类:其他好文   时间:2016-11-01 00:53:05    阅读次数:180
[LeetCode]6.ZigZag Conversion
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
leetcode算法思想快速一览
最近在看八股文。整理了一下思路,想深入了解还得多去写,无奈时间紧迫的情况下抛砖引玉也不失为下策: 1.Two Sum Easy 给出一个数组,找出其中两个和为目标值的坐标。思路: [1]排序。 和为目标值,一般的思路是先排序,然后取两点坐标分别从首尾向中间移动。若和为目标值则返回两点坐标。若和大于目 ...
分类:编程语言   时间:2016-10-22 14:48:35    阅读次数:171
480条   上一页 1 ... 12 13 14 15 16 ... 48 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!