Given a string S, find the longest palindromic
substring in S. You may assume that the maximum length of S is 1000, and there
exists one unique longes...
分类:
其他好文 时间:
2014-05-16 21:15:37
阅读次数:
454
one two three four five six seven eight
分类:
Web程序 时间:
2014-05-16 20:49:04
阅读次数:
340
一.测试数组长度是使用arr.length;(注:使用delete不会修改数组的length属性)二.数组方法 1.join
Array.join()方法将数组所有元素都转化为字符串连接在一起,返回生成的字符串。 var arr=[1,2,3];
//创建一个包含三个元素的数组ar...
分类:
编程语言 时间:
2014-05-16 09:08:28
阅读次数:
350
class Rational(n: Int, d: Int) { require(d != 0)
override def toString = n +"/"+ d}The require method takes one boolean
parameter. If the passed val.....
分类:
其他好文 时间:
2014-05-16 09:01:12
阅读次数:
272
题目链接题意: 给出单链表头指针head和整数n, 要求删除链表的倒数第n个结点,
这里n保证是合法的输入.我的思路....其实我没大明白题目建议的one pass是什么意思, 可能就是遍历一遍链表的,
不过我还是秉着能A掉就万岁的心态...我还是首先记录了链表的长度, 然后删除第len - n +...
分类:
其他好文 时间:
2014-05-16 05:45:56
阅读次数:
348
//基本类型for(int i=0;i<d.length;i++){for(int
j=i+1;j<d.length;j++){if(d[i]<d[j]){double
temp=d[i];d[i]=d[j];d[j]=temp;基本类型排序,需要注意2点,1,排序过程中,需要引用中间值,类似2个瓶...
分类:
其他好文 时间:
2014-05-15 16:52:11
阅读次数:
265
虽然结构是值类型,但在语法上常常可以把它们当作类来处理。例如,在上面的 Dimensions
类的定义中,可以编写下面的代码:Dimensions point = new Dimensions();point.Length = 3;point.Width
= 6;注意,因为结构是值类型,所以new ...
分类:
其他好文 时间:
2014-05-15 15:32:03
阅读次数:
300
题目
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
解答
本题考察进位问题,注...
分类:
其他好文 时间:
2014-05-15 04:16:56
阅读次数:
245
if($el.next().length===0){//结束的代码}for eg: list item
1 list item 2 list item 3 list item 4 list item 5
分类:
Web程序 时间:
2014-05-14 11:44:32
阅读次数:
516
最近在看Jdk6中String的源码的时候发现String的有个这样的构造方法,源代码内容如下:public String(String original)
{ int size = original.count; char[] originalValue = original.value; cha...
分类:
其他好文 时间:
2014-05-14 11:34:24
阅读次数:
274