Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-08-30 02:21:18
阅读次数:
246
# Definition for singly-linked list.class ListNode: def __init__(self, x): self.val = x self.next = Noneclass Solution: # @return ...
分类:
其他好文 时间:
2014-08-29 19:40:58
阅读次数:
164
leetcode上有四道关于移除有序序列中重复数字的题目,其中两道为数组结构,两道为链表结构,分别为:
(1)Remove Duplicates from sorted array I:移除一个有序数组中的重复数字,并且返回新数组的大小。
(2)Remove Duplicates from sorted array II:移除一个有序数组中的重复数字,并且返回新数组的大小,和上道题目不同的是每...
分类:
其他好文 时间:
2014-08-29 18:24:28
阅读次数:
289
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:
其他好文 时间:
2014-08-29 02:35:13
阅读次数:
203
题目:
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node fr...
分类:
其他好文 时间:
2014-08-28 18:12:35
阅读次数:
289
添加
redis.opsForSet().add("ANHMD", t);
参数Key,Value
删除
redis.opsForSet().remove("ANHMD", t);
查找
boolean s = redis.opsForSet().isMember("ANHMD", t);...
分类:
其他好文 时间:
2014-08-28 18:09:45
阅读次数:
672
jQuery.fn.outerHTML = function(s) { return (s) ? this.before(s).remove() : $("").append(this.eq(0).clone()).html(); }
分类:
Web程序 时间:
2014-08-28 17:51:45
阅读次数:
189
1 shell中for循环清理 每次去连接一下mongo, 进行数据的remove操作 echo "Begin ..." >> /root/time.log;
echo $(date +%Y-%m-%d-%H:%M:%S) >>/root/time.log;
for((i=1;i<=100000000;i++));
do
objec...
分类:
数据库 时间:
2014-08-27 16:48:08
阅读次数:
261
集合集合跟数组的区别:集合可以是不连续的、可以是多种数据类型数值、地址、下组元素地址 .Count 统计集合内元素的个数 .Add() 增加元素 .AddRange() 增加一组元素(比如一个数组) .Remove() 移除第一个()内的值 ....
分类:
其他好文 时间:
2014-08-27 09:18:47
阅读次数:
171
集合集合跟数组的区别:集合可以是不连续的、可以是多种数据类型数值、地址、下组元素地址 .Count 统计集合内元素的个数 .Add() 增加元素 .AddRange() 增加一组元素(比如一个数组) .Remove() 移除第一个()内的值 ....
分类:
其他好文 时间:
2014-08-26 17:13:16
阅读次数:
202