码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
leetcode----------Merge Two Sorted Lists
题目Merge Two Sorted Lists通过率33.2%难度EasyMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the ...
分类:其他好文   时间:2015-01-14 12:30:19    阅读次数:159
【leetcode】Median of Two Sorted Arrays(hard)★!!
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:其他好文   时间:2015-01-14 00:42:38    阅读次数:278
[leetcode]Maximum Gap
问题描述: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 0 if the array contains less than 2 ele...
分类:其他好文   时间:2015-01-13 23:17:46    阅读次数:330
[leetcode]23 Merge k Sorted Lists
问题描述: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 代码: public ListNode mergeTwoLists(ListNode l1, ListNode l2) { //java if(l2 == nu...
分类:其他好文   时间:2015-01-13 21:34:54    阅读次数:193
LeetCode--Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from ...
分类:其他好文   时间:2015-01-13 17:51:17    阅读次数:180
Hbase0.98版本的安装部署配置管理(Hadoop2.3、Hbase0.98、Hive0.13整合)
简介:HStore存储是HBase存储的核心了,其中由两部分组成,一部分是MemStore,一部分是StoreFiles。MemStore是Sorted Memory Buffer,用户写入的数据首先会放入MemStore,当MemStore满了以后会Flush成一个StoreFile(底层实现是HFile),当StoreFile文件数量增长到一定阈值,会触发Compact合并操作,将多个Stor...
分类:其他好文   时间:2015-01-13 17:42:11    阅读次数:274
[Leetcode] 4 - Median of Two Sorted Arrays
原题链接:https://oj.leetcode.com/problems/median-of-two-sorted-arrays/ 这是一道比较搞脑子的一道题,细节较多。 1. 这里用到的是findKth的思想,就是如果一共有奇数个元素,假设一共有t个元素,则中间元素为第t / 2 + 1个最大的,如果是偶数,则是t / 2位置和t / 2 + 1位置的平均数。 2. 关于find...
分类:其他好文   时间:2015-01-13 17:41:54    阅读次数:108
LeetCode--Remove Duplicates from Sorted List
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. /** * Definition for sin...
分类:其他好文   时间:2015-01-13 16:07:31    阅读次数:212
LeetCode--Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-...
分类:其他好文   时间:2015-01-13 16:00:02    阅读次数:137
Remove Duplicates from Sorted List
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/Given a sorted linked list, delete all duplicates such that each element appear on...
分类:其他好文   时间:2015-01-13 14:03:09    阅读次数:114
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!