码迷,mamicode.com
首页 >  
搜索关键字:leedcode    ( 225个结果
[leedcode 164] 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 ...
分类:其他好文   时间:2015-08-02 13:09:31    阅读次数:106
[leedcode 160] Intersection of Two Linked Lists
Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a...
分类:其他好文   时间:2015-08-01 23:29:05    阅读次数:146
[leedcode 153] Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m...
分类:其他好文   时间:2015-08-01 23:25:15    阅读次数:161
[leedcode 154] Find Minimum in Rotated Sorted Array II
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:其他好文   时间:2015-08-01 23:22:32    阅读次数:155
[leedcode 155] Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:其他好文   时间:2015-08-01 23:17:36    阅读次数:108
[leedcode 151] Reverse Words in a String
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog...
分类:其他好文   时间:2015-08-01 21:59:34    阅读次数:122
[leedcode 150] Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他好文   时间:2015-08-01 21:45:38    阅读次数:89
[leedcode 149] Max Points on a Line
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * class Point { * i...
分类:其他好文   时间:2015-08-01 20:26:30    阅读次数:118
[leedcode 148] Sort List
Sort a linked list inO(nlogn) time using constant space complexity./** * Definition for singly-linked list. * public class ListNode { * int val; *...
分类:其他好文   时间:2015-08-01 18:42:38    阅读次数:108
[leedcode 147] Insertion Sort List
Sort a linked list using insertion sort./** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * L...
分类:其他好文   时间:2015-08-01 18:35:22    阅读次数:101
225条   上一页 1 ... 8 9 10 11 12 ... 23 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!