码迷,mamicode.com
首页 >  
搜索关键字:kth smallest element    ( 12839个结果
Remove Duplicates from Sorted List leetcode java
题目: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
HDU2665_Kth number
给一个数组,求区间[l,r]中第k大的数。今天被各种数据结构虐爆了,自己还是需要学习一下函数式线段树的,这个东西好像还挺常用。函数式线段树的思想是这样的,对于每个时间状态,我们都建立一颗线段树,查询两个状态在某个区间的差的话,我们只要找到两个状态分别对应的点相减即可。由于每次我使用线段树更新的时候,...
分类:其他好文   时间:2014-07-23 11:47:06    阅读次数:241
Java学习之Xml系列一:初始步骤、查询元素及属性、遍历元素
话不多说,全在代码和注释说明里了。 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
【LeetCode】Single Number II
题目 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
Leet code —Jump Game
问题描述: 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
[leetcode]Remove Duplicates from Sorted Array
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
min_element()与max_element()
algorithm之min_element()与max_element()...
分类:其他好文   时间:2014-07-22 14:17:49    阅读次数:172
LeetCode:Single Number II
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
【leetcode刷题笔记】Jump Game II
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
【leetcode刷题笔记】Jump Game
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!