Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new len...
分类:
其他好文 时间:
2014-11-14 12:18:21
阅读次数:
89
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:
其他好文 时间:
2014-11-14 10:29:38
阅读次数:
157
XML解析的详细分析与jaxp解析XML详见:XML学习笔记(四):使用 DOM和SAX 解析XML
一、JDom
1、创建XML文件:
1)Document类即代表整个XML文档,把生成的 Document 利用 XMLOutputter 类输出即可。
2)映射关系:元素:Element;属性:Attribute;注解:Comment;文本信息:Text;
3)注意:addCo...
分类:
其他好文 时间:
2014-11-14 08:09:53
阅读次数:
176
Question:Given a sorted array of n integers that has been rotated an unknown number of times, give an O(log n) algorithm that finds an element in the ...
分类:
其他好文 时间:
2014-11-14 01:30:09
阅读次数:
118
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get ...
分类:
其他好文 时间:
2014-11-13 20:50:45
阅读次数:
197
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:
其他好文 时间:
2014-11-13 18:07:10
阅读次数:
212
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-11-13 16:03:20
阅读次数:
139
定义了一个MyList类
包含的函数:
getHead()返回头指针;
isEmpty() 判断是否为空;
addFirst(T element)在链表的头部加入元素;
addLast(T element)在链表的尾部加入元;
add(T fix...
分类:
编程语言 时间:
2014-11-12 21:23:08
阅读次数:
268
leetcode-Remove Duplicates from Sorted Array
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 spac...
分类:
其他好文 时间:
2014-11-12 16:39:30
阅读次数:
197
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-11-12 16:15:21
阅读次数:
118