之前一步一步存的方法略复杂啊,其实直接二分扔就可以咯这里直接给个II的解法,和I多个冗余挪位的判断public class Solution { public int findMin(int[] nums) { int min = nums[0]; int l=0,...
分类:
其他好文 时间:
2015-04-19 13:05:12
阅读次数:
86
转自:http://blog.csdn.net/lilongherolilong/article/details/6624390先挖好坑,明天该去郑轻找虐RMQ(Range Minimum/Maximum Query)问题是求区间最值问题。你当然可以写个O(n)的(怎么写都可以吧=_=),但是万一要...
分类:
编程语言 时间:
2015-04-18 21:45:17
阅读次数:
154
Minimum Inversion NumberTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:139464-bit integer IO format:%I64d Java ...
分类:
其他好文 时间:
2015-04-17 21:50:14
阅读次数:
120
F - The Minimum Length
Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu
Submit Status
Description
There is a string A. The length of A is less than 1,000,000. I rewrite it aga...
分类:
其他好文 时间:
2015-04-17 11:45:01
阅读次数:
137
Minimum Depth of Binary TreeTotal Accepted:50435Total Submissions:173043My SubmissionsQuestionSolutionGiven a binary tree, find its minimum depth.The ...
分类:
其他好文 时间:
2015-04-16 12:10:14
阅读次数:
125
Find Minimum in Rotated Sorted Array Total Accepted: 38126 Total Submissions: 115306 My Submissions Question Solution
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,...
分类:
其他好文 时间:
2015-04-15 23:28:57
阅读次数:
160
Find Minimum in Rotated Sorted Array II Total Accepted: 23090 Total Submissions: 73108 My Submissions Question Solution
Follow up for “Find Minimum in Rotated Sorted Array”:
What if duplicates are a...
分类:
其他好文 时间:
2015-04-15 23:26:18
阅读次数:
188
https://leetcode.com/problems/min-stack/Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Pu...
分类:
其他好文 时间:
2015-04-15 16:44:16
阅读次数:
126
主要是细节和把握一位数组的能力public class Solution { public int minPathSum(int[][] grid) { if(grid==null || grid.length==0 || grid[0].length==0) return 0;...
分类:
其他好文 时间:
2015-04-15 07:12:55
阅读次数:
121
Minimum Inversion Number
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status Practice HDU
1394
Appoint description:
System Crawler (2015-04-13)
...
分类:
其他好文 时间:
2015-04-14 21:36:51
阅读次数:
174