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?then left-out nodes in the end should remain as i...
分类:
其他好文 时间:
2015-02-02 23:24:35
阅读次数:
369
Q:
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 digit. Add the two numbers and return it as ...
分类:
其他好文 时间:
2015-02-02 23:06:26
阅读次数:
153
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 then left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2015-02-02 14:12:09
阅读次数:
110
function trim() { var start, end; start = 0; end = this.length - 1; while(start = 0; end --) { str = str + this.charAt(end); } ...
分类:
编程语言 时间:
2015-02-02 01:53:35
阅读次数:
195
题目链接:Reverse Nodes in k-Group
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 then left-out nodes in t...
分类:
其他好文 时间:
2015-02-01 17:49:40
阅读次数:
191
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2015-02-01 16:04:04
阅读次数:
125
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".public class Solution { pub...
分类:
其他好文 时间:
2015-02-01 16:02:21
阅读次数:
192
Q:Determine whether an integer is a palindrome. Do this without extra space.
这道题也是基础题,判断一个数是否是回文数,条件是不能使用额外的空间,意思就是说,你不能把一个Intege转换成string,然后对string进行回文字符串的判断。
另外,如果用Reverse Integer的方法,可能会造成数值溢出,比如判...
分类:
其他好文 时间:
2015-01-31 12:31:11
阅读次数:
169
上界2147483647-, 下界2147483648. 反过来看7463847412 -> 2147483647, -8463847412 -> -2147483648为使反转不越界,那么绝对值大于10^9的参数x的前9位应满足 2147483647. (参数x,本身没有越界,所以d肯定是1或2....
分类:
其他好文 时间:
2015-01-30 20:54:36
阅读次数:
127
做个应用界面,需要批量查地址和ip,各地图网站一般都支持geocoding web api。
主要用到两个服务接口:geocode(把街道名转换成gps位置),reverse(把gps地址转换成街道名地址)...
分类:
其他好文 时间:
2015-01-30 19:45:55
阅读次数:
200