Problem Description:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Solution: ...
分类:
其他好文 时间:
2014-07-07 16:39:19
阅读次数:
163
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, ...
分类:
其他好文 时间:
2014-07-07 14:54:18
阅读次数:
219
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clarification:What constitutes...
分类:
其他好文 时间:
2014-07-03 20:45:35
阅读次数:
201
【题目】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word....
分类:
其他好文 时间:
2014-07-02 08:34:34
阅读次数:
170
Sort colors:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the...
分类:
其他好文 时间:
2014-07-01 12:57:43
阅读次数:
179
算法的原理在:
点击打开链接
原理大概意思是:将R,G,B各分量信息 颜色信息划分为 N 区间。
例如下图:4X4X4 的区间
red
0-63
64-127
128-191
192-255
blue
0-63
43
78
18
0
64-127
45
67
33
2
128-191
1...
分类:
其他好文 时间:
2014-07-01 08:42:47
阅读次数:
181
Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh...
分类:
其他好文 时间:
2014-06-27 12:55:53
阅读次数:
235
枚举类型是JDK5.0的新特征。Sun引进了一个全新的关键字enum来定义一个枚举类。下面就是一个典型枚举类型的定义:public enum Color{ RED,BLUE,BLACK,YELLOW,GREEN } 显然,enum很像特殊的class,实际上enum声明定义的类型就是一个类。...
分类:
其他好文 时间:
2014-06-27 10:59:37
阅读次数:
257
#lll public static void main(String[]args){ System.out.println("helloworld!"); } //这是一个代码块 * Red * Green * Blue* Lorem ipsum dolor sit amet, co...
分类:
其他好文 时间:
2014-06-26 13:07:43
阅读次数:
184
【问题】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
【代码】
class Solution:
# @param s, a string
# @retu...
分类:
其他好文 时间:
2014-06-24 21:00:30
阅读次数:
168