码迷,mamicode.com
首页 >  
搜索关键字:should    ( 4948个结果
leetcode[1]Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2015-02-10 14:59:57    阅读次数:107
leetcode[21]Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def...
分类:其他好文   时间:2015-02-10 14:55:46    阅读次数:127
leetcode[41]First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:其他好文   时间:2015-02-10 14:55:06    阅读次数:155
leetcode[4]Median of Two Sorted Arrays
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-02-10 14:48:19    阅读次数:126
HappyLeetcode47:Median of Two Sorted Arrays
题目: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 ...
分类:移动开发   时间:2015-02-10 13:02:20    阅读次数:120
24.Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you shouldreturn the list as 2->1->4->3. Your algorithm should use only constant space. You ma...
分类:其他好文   时间:2015-02-10 09:18:43    阅读次数:143
[leet code 4] Median of Two Sorted Arrays
1 题目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...
分类:其他好文   时间:2015-02-09 22:49:25    阅读次数:219
LeetCode Median of Two Sorted Arrays
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)).思路分析:这题容易想到O(m+n)的解法,就是先Merge两个数组,然后返...
分类:其他好文   时间:2015-02-09 16:06:53    阅读次数:106
leetcode[59]Spiral Matrix II
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:其他好文   时间:2015-02-09 15:47:09    阅读次数:151
leetcode[86]Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2015-02-09 15:31:55    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!