【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
JavaScript兼容问题汇总[实时更新]...
分类:
编程语言 时间:
2014-05-18 15:33:49
阅读次数:
279
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all vali...
分类:
其他好文 时间:
2014-05-18 15:11:17
阅读次数:
249
Problem Description
已知一个圆的圆周被N个点分成了N段等长圆弧,求任意取三个点,组成锐角三角形的个数。
Input
多组数据,每组数据一个N(N
Output
对于每组数据,输出不同锐角三角形的个数。
Sample Input
3
4
5
Sample Output
1
0
5
分析:当3个点组成锐角三角形A...
分类:
其他好文 时间:
2014-05-18 14:51:50
阅读次数:
220
分享2014-4-1
HTML5上课笔记
2、CSS3属性(内核前缀)
Mozilla 内核 css前缀-moz;
WebKit 内核 css前缀-webkit ;(谷歌已换用blink内核)
Opera 内核 css前缀 -o ; (欧朋已换用blink内核)
Trident 内核 css前缀 -ms ;
...
分类:
Web程序 时间:
2014-05-18 10:37:02
阅读次数:
592
【题目】
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
【题意】
判断给定的字符串是否是合法的...
分类:
其他好文 时间:
2014-05-18 10:08:11
阅读次数:
327
python创建二叉树,源代码如下:
#!/usr/bin/python
class node():
def __init__(self,k=None,l=None,r=None):
self.key=k;
self.left=l;
self.right=r;
def create(root):
a=raw_input('enter a key:');
if a is '#...
分类:
编程语言 时间:
2014-05-18 09:27:13
阅读次数:
384
最常用的向HTML中插入视频的方法有两种,一种是古老的标签,一种是html5中的标签。
前者的兼容性没得说,但是使用起来不太方便,后者使用起来很方便,但是兼容性让人头疼。
虽然后者兼容性存在很多问题,但是因为使用很方便,符合未来网页设计发展的趋势,因此我们以后者为主要的插入视频的方法,因为它兼容性的问题,前者作为辅助。
示例如下:
...
分类:
Web程序 时间:
2014-05-18 07:10:43
阅读次数:
257
3SumClosest
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 would have exactly one solution....
分类:
其他好文 时间:
2014-05-18 05:57:48
阅读次数:
244
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-spa...
分类:
其他好文 时间:
2014-05-18 04:12:07
阅读次数:
198