码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
LeetCode Remove Duplicates from Sorted Array II
title  描述  Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3],  Your function should return length = 5, and A is no...
分类:其他好文   时间:2014-10-09 03:14:48    阅读次数:163
LeetCode Remove Duplicates from Sorted Array
问题描述: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place ...
分类:其他好文   时间:2014-10-09 02:58:47    阅读次数:175
【LeetCode】【Python题解】Container with most water
这道题真真是在面试中碰到过,可惜当时复杂度到O(n2)了,太挫了,怪不得没有通过面试。 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two en...
分类:编程语言   时间:2014-10-09 01:58:17    阅读次数:229
LeetCode-Swap Nodes in Pairs
题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your al...
分类:其他好文   时间:2014-10-09 00:31:07    阅读次数:234
leetcode_1线性表_1数组_1&2Remove Duplicates from Sorted Array I & II
1.1.1 Remove Duplicates from Sorted Array题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the ...
分类:其他好文   时间:2014-10-08 14:20:45    阅读次数:229
Median of Two Sorted Arrays
[leetcode]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 O(log (m+n))....
分类:其他好文   时间:2014-10-08 14:00:15    阅读次数:147
UVA - 12338 Anti-Rhyme Pairs (哈希)
DescriptionD Anti-Rhyme Pairs Input: Standard Input Output: Standard Output Often two words that rhyme also end in the same sequence of characters. We...
分类:其他好文   时间:2014-10-08 11:01:35    阅读次数:261
Convert Sorted Array to Binary Search Tree
[leetcode]Given an array where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-08 10:09:55    阅读次数:164
Leetcode: Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t...
分类:其他好文   时间:2014-10-08 07:40:24    阅读次数:228
Remove Duplicates from Sorted List I&&II
Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, r...
分类:其他好文   时间:2014-10-08 01:26:44    阅读次数:239
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!