题目: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-....
分类:
编程语言 时间:
2014-07-23 12:01:16
阅读次数:
239
给一个数组,求区间[l,r]中第k大的数。今天被各种数据结构虐爆了,自己还是需要学习一下函数式线段树的,这个东西好像还挺常用。函数式线段树的思想是这样的,对于每个时间状态,我们都建立一颗线段树,查询两个状态在某个区间的差的话,我们只要找到两个状态分别对应的点相减即可。由于每次我使用线段树更新的时候,...
分类:
其他好文 时间:
2014-07-23 11:47:06
阅读次数:
241
话不多说,全在代码和注释说明里了。 DTD文件:SwordTypeDefinition.dtd <?xml?version="1.0"?encoding="UTF-8"?>
<!ELEMENT?SwordLibrary?(Sword*)>
<!ELEMENT?Sword?(SwordName,Price,Attack)>
<!ELEMENT...
分类:
编程语言 时间:
2014-07-23 00:32:07
阅读次数:
330
题目
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 complexity. Could you implement it wit...
分类:
其他好文 时间:
2014-07-23 00:13:17
阅读次数:
331
问题描述:
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determin...
分类:
其他好文 时间:
2014-07-23 00:04:37
阅读次数:
216
Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new lengt...
分类:
其他好文 时间:
2014-07-22 22:48:14
阅读次数:
224
algorithm之min_element()与max_element()...
分类:
其他好文 时间:
2014-07-22 14:17:49
阅读次数:
172
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-07-22 00:28:38
阅读次数:
209
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-07-22 00:12:36
阅读次数:
156
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-07-22 00:09:37
阅读次数:
151