题目要求:给定一个字符串由不同单词组成,返回其相反顺序,中间可能有多余字符:例如:Given s = "the sky is blue",return "blue is sky the".个人解法:1.暴力,主要是对于两个单词中间存在多个空格的处理。2. 利用栈来存储临时变量。3.缺点,空间利用太大...
分类:
其他好文 时间:
2015-08-07 07:05:41
阅读次数:
115
用来表示一个 RGB 颜色值。 语法 RGB(red, green, blue) RGB 函数的语法含有以下这些命名参数: 部分 描述 red 必要参数;Variant (Integer)。数值范围从 0 到 255,表示颜色的红色成份。 green 必要参数;Variant (Intege...
分类:
其他好文 时间:
2015-08-05 10:12:21
阅读次数:
196
Blue JeansTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14113Accepted: 6260DescriptionThe Genographic Project is a research partnership bet...
分类:
其他好文 时间:
2015-08-03 10:04:03
阅读次数:
102
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog...
分类:
其他好文 时间:
2015-08-01 21:59:34
阅读次数:
122
1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 5 // 蓝色 6 UIView *blue = [[UIView alloc] init]; 7 blue.backgroundColor = [UIC...
分类:
移动开发 时间:
2015-07-31 12:39:08
阅读次数:
138
大致题意: 给出n个长度为60的DNA基因(A腺嘌呤 G鸟嘌呤 T胸腺嘧啶 C胞嘧啶)序列,求出他们的最长公共子序列使用后缀数组解决 1 #include 2 #include 3 char str[6200],res[6200]; 4 int num[6200],loc[6200]; ...
分类:
编程语言 时间:
2015-07-31 10:29:22
阅读次数:
155
linux查看系统的硬件信息,并不像windows那么直观,这里我罗列了查看系统信息的实用命令,并做了分类,实例解说。cpulscpu命令,查看的是cpu的统计信息.blue@blue-pc:~$ lscpuArchitecture: i686 #cpu架构C...
分类:
系统相关 时间:
2015-07-30 11:09:18
阅读次数:
130
【075-Sort Colors (颜色排序)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 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...
分类:
编程语言 时间:
2015-07-30 07:12:16
阅读次数:
136
1、req.query?处理GET请求 ,获取GET参数 //GET /search?q=tobi+ferret req.query.q //=>"tobi ferret" //GET /shoes?order=desc&shoe[color]=blue&shoe[type]=converse req.query.order //=>"desc" req.query....
分类:
Web程序 时间:
2015-07-29 23:15:39
阅读次数:
350
‘red‘,‘blue‘,‘green‘,‘yellow‘$colors=array(‘red‘,‘blue‘,‘green‘,‘yellow‘);while(list($key,$val)=each($colors)){$x=$colors;//赋任意指针回到开始位置echo"$key=>$val<br/>";
分类:
其他好文 时间:
2015-07-29 06:53:20
阅读次数:
165