Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".此题要注意的几个情况是:(1)输入字符串可能含有前缀0和后缀...
分类:
其他好文 时间:
2014-06-28 22:51:26
阅读次数:
261
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-06-28 22:31:11
阅读次数:
323
题目链接 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k t...
分类:
其他好文 时间:
2014-06-28 21:12:46
阅读次数:
211
1- "原地"排序-转换后替换>>> list = [2,1,3]>>> list.sort()>>> list[1, 2, 3]降序 reverse = True>>> list.sort(reverse = True)>>> list[3, 2, 1, 1]2- "复制"排序-转换然后返回>>>...
分类:
编程语言 时间:
2014-06-28 20:04:47
阅读次数:
299
quint64 getDiskFreeSpace(QString driver){ LPCWSTR lpcwstrDriver=(LPCWSTR)driver.utf16(); ULARGE_INTEGER liFreeBytesAvailable, liTotalBytes, liTotalFre...
分类:
其他好文 时间:
2014-06-20 23:01:02
阅读次数:
387
整数类型(Integer)在JavaScript经常会导致一些奇怪的问题。在ECMAScript的规范中,他们只存在于概念中:所有的数字都是浮点数,并且整数只是没有一组没有小数的数字。 在这篇博客中,我会解释如何去检查某个值是否为整型。 ECMAScript 5 在ES5中有很多方法你可以使...
分类:
编程语言 时间:
2014-06-19 07:28:28
阅读次数:
226
LeetCode之Integer to Roman, Roman to Integer...
分类:
其他好文 时间:
2014-06-18 07:40:36
阅读次数:
195
1. 提供对应的构造方法
//构造器注入
public class Bean6 {
private String name;
private Integer age;
// 服务于构造器注入使用
public Bean6(String name, Integer age) {
super();
this.name = name;
this.age = age;
...
分类:
编程语言 时间:
2014-06-18 06:15:08
阅读次数:
199
1. 提供对应要注入的属性
//setter注入
public class Bean2 {
private String name;
private Integer age;
// 提供要注入的属性对应的setter方法
public void setName(String name) {
this.name = name;
}
public void setAge(I...
分类:
其他好文 时间:
2014-06-18 06:14:27
阅读次数:
209
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-06-17 23:38:04
阅读次数:
341