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
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
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
function ret = GenColorList() ret = [ 0 0 255; # blue 138 43 226; # blueviolet 165 42 42; # brown 210 105 30; # chocolate 0 100 0; # dark-g...
分类:
其他好文 时间:
2014-06-24 14:11:38
阅读次数:
199
BackgroundAfter trying to solve problem EDIT1(Editor) and being ****ed by Brainf**k, Blue Mary decided to set another difficult problem about editor.D...
分类:
其他好文 时间:
2014-06-24 11:43:44
阅读次数:
245
15.1 枚举类型枚举类型定义了一组“符号名称/值”配对。例如,以下Color类型定义了一组符合,每个符号表示一种颜色。internal enum Color{ White, //赋值0 Red, //赋值1 Green, //赋值2 Blue, //赋值3 Or...
分类:
其他好文 时间:
2014-06-23 07:20:33
阅读次数:
203