Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2014-08-01 12:49:41
阅读次数:
186
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.题意:翻转...
分类:
其他好文 时间:
2014-08-01 04:47:01
阅读次数:
176
Problem Description:
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 numbe...
分类:
其他好文 时间:
2014-07-31 20:47:17
阅读次数:
215
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat...
分类:
其他好文 时间:
2014-07-31 02:38:55
阅读次数:
292
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
其他好文 时间:
2014-07-30 12:05:03
阅读次数:
248
题目:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain....
分类:
移动开发 时间:
2014-07-30 09:47:13
阅读次数:
272
对应海明距离的LSH称为位采样算法(bit sampling),该算法是比较得到的哈希值的海明距离,但是一般距离都是用欧式距离进行度量的,将欧式距离映射到海明空间再比较其的海明距离比较麻烦。于是,研究者提出了基于p-稳定分布的位置敏感哈希算法,可以直接处理欧式距离,并解决(R,c)-近邻问题。...
分类:
其他好文 时间:
2014-07-30 01:07:52
阅读次数:
985
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your ma....
分类:
编程语言 时间:
2014-07-28 11:34:40
阅读次数:
210
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your ma....
分类:
编程语言 时间:
2014-07-28 11:33:50
阅读次数:
278
正则表达式的先行断言和后行断言一共有4种形式:? (?=pattern) 零宽正向先行断言(zero-width positive lookahead assertion)? (?!pattern) 零宽负向先行断言(zero-width negative lookahead assertion)? (?<=...
分类:
其他好文 时间:
2014-07-28 00:49:49
阅读次数:
285