最近打算开始每隔一天练一道leetcode(虽然对我来说有点难,但是希望能坚持下去^_^),自己的编程语言基础还不扎实,遇到磕磕碰碰,几天做了一道leetcode比较简单的题目,把我的解题思想分享给大家,顺便附上代码。问题如下:问题链接:https://leetcode.com/problems/z...
分类:
其他好文 时间:
2015-05-24 12:45:08
阅读次数:
108
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 ...
分类:
编程语言 时间:
2015-05-23 10:02:04
阅读次数:
170
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...
分类:
其他好文 时间:
2015-05-21 10:28:55
阅读次数:
159
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 in a fixed font for better legibility)P A H...
分类:
其他好文 时间:
2015-05-14 14:18:13
阅读次数:
174
题目: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...
分类:
其他好文 时间:
2015-05-14 13:35:24
阅读次数:
129
Title:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree...
分类:
其他好文 时间:
2015-05-13 18:37:24
阅读次数:
92
public class Solution { public String convert(String s, int numRows) { String res = ""; if (s.length() < numRows || numRows == 1) { ...
分类:
其他好文 时间:
2015-05-13 06:17:07
阅读次数:
108
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...
分类:
其他好文 时间:
2015-05-12 23:03:53
阅读次数:
218
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 ...
分类:
其他好文 时间:
2015-05-08 09:36:17
阅读次数:
136
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 fo...
分类:
其他好文 时间:
2015-05-08 01:30:06
阅读次数:
127