码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
LeetCode-4 Median of Two Sorted Arrays
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:其他好文   时间:2015-05-19 18:56:06    阅读次数:91
Java for LeetCode 081 Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function ...
分类:编程语言   时间:2015-05-19 12:24:16    阅读次数:112
【LeetCode】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 should be O(log (m+n)).问题分析首先...
分类:其他好文   时间:2015-05-18 23:04:00    阅读次数:156
Java for LeetCode 076 Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD...
分类:编程语言   时间:2015-05-18 22:48:32    阅读次数:272
【Sort List】cpp
题目:Sort a linked list inO(nlogn) time using constant space complexity.代码:/** * Definition for singly-linked list. * struct ListNode { * int val; *...
分类:其他好文   时间:2015-05-18 22:34:18    阅读次数:119
【Merge K Sorted Lists】cpp
题目:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.代码:/** * Definition for singly-linked list. * struc...
分类:其他好文   时间:2015-05-18 20:46:25    阅读次数:105
【leetcode】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 ord...
分类:其他好文   时间:2015-05-17 20:11:30    阅读次数:126
Single Number I
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:其他好文   时间:2015-05-16 23:06:06    阅读次数:148
Leetcode#81Search in Rotated Sorted Array II
SearchinRotatedSortedArrayIITotalAccepted:35100TotalSubmissions:111308MySubmissionsQuestionSolutionFollowupfor"SearchinRotatedSortedArray":Whatifduplicatesareallowed?Wouldthisaffecttherun-timecomplexity?Howandwhy?Writeafunctiontodetermineifagiventargetisint..
分类:其他好文   时间:2015-05-16 18:37:20    阅读次数:158
LeetCode 34 Search for a Range (C,C++,Java,Python)
Problem: 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 order of O(log n). If the target...
分类:编程语言   时间:2015-05-14 22:03:52    阅读次数:133
1097条   上一页 1 ... 55 56 57 58 59 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!