题目
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
方法
遍...
分类:
其他好文 时间:
2014-06-11 00:41:44
阅读次数:
207
Given an array of integers, every element
appears twice except for one. Find that single one.Note: Your algorithm should
have a linear runtime complex...
分类:
其他好文 时间:
2014-06-10 21:27:22
阅读次数:
284
Given an array of integers, every element
appears three times except for one. Find that single one.Note: Your algorithm
should have a linear runtime c...
分类:
其他好文 时间:
2014-06-10 20:42:48
阅读次数:
315
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int i,j; 5 for(i=0; i<n; i++) 6 { 7 for(j...
分类:
移动开发 时间:
2014-06-10 11:41:55
阅读次数:
259
jQuery中存在两个each方法都是用于遍历的,
一个是对jQuery对象集合使用.each(),用于遍历这个集合; .each(function(index,element))
还有一个是扩展jQuery的静态.each()方法.从源码中可以看到,存在一...
分类:
Web程序 时间:
2014-06-09 21:47:59
阅读次数:
275
对于开发人员来说,本次更新的重点还有element.animate()、HTML
Imports、Object.observe()的引入,以及一个改进后的throttled async touchmove model。最后,Chrome 36
beta还带来了一些HTML Imports(Web C...
分类:
其他好文 时间:
2014-06-09 21:13:42
阅读次数:
249
$.validator.addMethod("cnphone", function(value,
element, params) { var length = value.length; var mobile =
/^(((1(3|4|5|7|8)[0-...
分类:
移动开发 时间:
2014-06-09 17:48:49
阅读次数:
222
题目链接题意: 给出 n * n的矩阵,要求将矩阵顺时针旋转90°(不使用额外空间) 1 /* 2
Basically, divide the array into 4 along the diagonals, 3 then for each element
in the top ...
分类:
其他好文 时间:
2014-06-09 15:28:14
阅读次数:
280
题目链接题意:给出长度为n的数组,和整数elem, 要求删除数组中存在的elem,返回最终的数组长度。附上代码:
1 class Solution { 2 public: 3 int removeElement(int A[], int n, int elem) { 4
//...
分类:
其他好文 时间:
2014-06-09 13:38:05
阅读次数:
190
今天开始刷leetcode上的题,争取校招前刷过一遍,从AC率最高的题目开始刷,不废话了,看题题目:Single
NumberGiven an array of integers, every element appearstwiceexcept for one. Find
that single ...
分类:
其他好文 时间:
2014-06-09 12:57:45
阅读次数:
260