题目
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
TreeView控件--树控件
为用户显示节点层次结构,每个节点又可以包含子节点。
添加和删除树节点
添加--TreeView的Nodes属性的Add方法:public virtual int Add(TreeNode node)
删除--TreeView的Nodes属性的Remove方法:public void Remove(TreeNode node)
添加-...
题目链接题意:给出长度为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
1.程序运行后异常显示:解决方案:在项目上点击右键->properties->Java
Build Path,remove掉Android Dependences即可
分类:
编程语言 时间:
2014-06-09 00:52:35
阅读次数:
247
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-06-08 21:56:41
阅读次数:
297
题目
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 matter what you leave beyond the new length.
原题链接(点我)
解题思路
给一个数组和一个数字,移除该数字在数组中所有出现的地方。
这是一个非常简单的题目,应...
分类:
其他好文 时间:
2014-06-08 04:05:50
阅读次数:
284
sudo apt-get install mysql-server
装完后 是无法远程访问的.
要先修改
sudo vim /etc/mysql/my.cnf
找到 bind-address = 127.0.0.1
注释掉.就ok了
如果之前装乱了...
可以这样彻底删除
sudo apt-get remove --purge mysql-server
sudo a...
分类:
数据库 时间:
2014-06-08 03:56:15
阅读次数:
288
题目...For example,Given input array A = [1,1,2],Your function should return length = 2, and A is now [1,2].
解题思路,
移除数组中的重复元素,并返回新数组的长度。
这个题目应该算是简单的题目。使用两个变量就可以。具体的看代码
代码实现......
分类:
其他好文 时间:
2014-06-08 03:54:22
阅读次数:
279
ListIterator的父接口是Iterator,是List接口中特有的迭代器。
ListIterator在Iterator的基础上,又新添了很多方法:
Iterator中的方法:
1、判断是否有下一个元素:hasNext();
2、获取下一个元素: next();
3、删除迭代器指向的元素:remove();
ListIterator新添的方法:
4、判断...
分类:
其他好文 时间:
2014-06-08 03:15:53
阅读次数:
246
Given a linked list, remove thenthnode from the
end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-06-07 16:54:26
阅读次数:
221