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
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2015-01-31 12:05:25
阅读次数:
209
1、变量变量的值的类型:基本类型值和引用类型值两种。基本类型:Undefined、Null、Boolean、String、Number,这五类基本数据类型的值在内存中占有固定大小的空间,因此保存在栈内存(存放简单数据)中。引用类型值:是指存放在堆内存中的对象,占用的大小不固定,变量中保存的只是指向对...
分类:
编程语言 时间:
2015-01-31 12:00:31
阅读次数:
335
.lengthcomfirm("");prompt(""); Use thepromptcommand to ask the user where they are from.number string booleanconsole.log
分类:
编程语言 时间:
2015-01-31 00:24:54
阅读次数:
177
KMP算法KMP的基处题目,数字数组的KMP算法应用。主要是模式串的处理,当模式串内有重复时,模式串向左回溯重复的点的位置(next[])。Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], a...
分类:
其他好文 时间:
2015-01-31 00:03:28
阅读次数:
170
ExtrudeGeometry用来通过截面(参数shape)生成拉伸几何体.
ExtrudeGeometry
拉伸几何体截面
拉伸几何体参数选项
* parameters = {
*
* curveSegments: , // number of points on ...
分类:
Web程序 时间:
2015-01-30 22:46:35
阅读次数:
675
题目链接:Letter Combinations of a Phone
Number
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone...
分类:
其他好文 时间:
2015-01-30 22:43:16
阅读次数:
175
题目链接:3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input...
分类:
其他好文 时间:
2015-01-30 22:42:30
阅读次数:
252
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line. 1 import java.util.HashMap; 2 import java.util.Itera...
分类:
其他好文 时间:
2015-01-30 21:04:34
阅读次数:
169
函数名: abs 功 能: 求整数的绝对值用 法: int abs(int i);程序例:#include #include int main(void){ int number = -1234; printf("number: %d absolute value: %d/n", numb...
分类:
编程语言 时间:
2015-01-30 19:33:34
阅读次数:
126