码迷,mamicode.com
首页 >  
搜索关键字:zigzag conversion    ( 910个结果
37. Binary Tree Zigzag Level Order Traversal && Binary Tree Inorder Traversal
思路: 使用两个队列(一个可以顺序读,所以用vector模拟),每个队列放一层结点。 题解: 两种方法: 1. 使用栈: O(n) Time, O(n) Space。 2. Morris traversal (构造线索树), O(n) Time, O(1) Space.
分类:其他好文   时间:2014-08-27 20:16:18    阅读次数:227
【Leet Code】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 for better legibility) P A H N A P L S I ...
分类:其他好文   时间:2014-08-25 23:00:25    阅读次数:671
[LeetCode] 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 ...
分类:其他好文   时间:2014-08-25 22:27:24    阅读次数:315
LeetCode ZigZag Conversion
class Solution {public: string convert(string s, int nRows) { int len = s.length(); if (len cols; int si = 0; int ri =...
分类:其他好文   时间:2014-08-17 21:21:32    阅读次数:218
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 ...
分类:其他好文   时间:2014-08-17 18:25:02    阅读次数:233
[LeetCode]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 for better legibility) P A H N A P L S I ...
分类:其他好文   时间:2014-08-17 13:09:52    阅读次数:168
Binary Tree Zigzag Level Order Traversal
Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al...
分类:其他好文   时间:2014-08-16 00:59:49    阅读次数:179
px , point等单位之间换算
Pixel ? Point Conversion Table...
分类:其他好文   时间:2014-08-13 19:00:00    阅读次数:373
Unable to execute dex: Multiple dex files define
在 clean project 后,并没有报错,但是在'Run as Android Application' 的时候就会报出这样的错。1 Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files de...
分类:其他好文   时间:2014-08-13 00:27:34    阅读次数:320
【leetcode】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 for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIG...
分类:其他好文   时间:2014-08-12 00:47:43    阅读次数:196
910条   上一页 1 ... 80 81 82 83 84 ... 91 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!