码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Subscribe to see which companies asked this questio
分类:其他好文   时间:2016-03-18 21:46:29    阅读次数:208
148. Sort List
Sort a linked list in O(n log n) time using constant space complexity. 链表的归并排序。 /** * Definition for singly-linked list. * struct ListNode { * int val
分类:其他好文   时间:2016-03-09 01:21:31    阅读次数:138
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh
分类:其他好文   时间:2016-03-07 01:21:12    阅读次数:136
23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. AC代码: def mergeKLists_merge_sort(self, lists): def
分类:其他好文   时间:2016-03-02 01:39:52    阅读次数:155
lintcode-easy-First Position of Target
For a given sorted array (ascending order) and atarget number, find the first index of this number inO(log n) time complexity. If the target number do
分类:其他好文   时间:2016-02-24 19:02:07    阅读次数:172
LeetCode - 29. Divide Two Integers
29. Divide Two Integers Problem's Link ---------------------------------------------------------------------------- Mean: 略 analyse: 略 Time complexity
分类:其他好文   时间:2016-02-19 18:59:57    阅读次数:117
leetcode 34. Search for a Range
问题描述: Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in
分类:其他好文   时间:2016-02-14 23:41:02    阅读次数:286
LeetCode Wiggle Sort
原题链接在这里:https://leetcode.com/problems/wiggle-sort/ 当 i 是奇数时,若nums[i] < nums[i-1], 互换。 当 i 是偶数时,若nums[i] > nums[i-1], 互换。 Time Complexity: O(n). Space:
分类:其他好文   时间:2016-02-11 11:08:52    阅读次数:150
Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the or
分类:其他好文   时间:2016-02-07 13:35:21    阅读次数:219
leetcode-4 Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh
分类:其他好文   时间:2016-02-01 02:12:35    阅读次数:105
1097条   上一页 1 ... 33 34 35 36 37 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!