码迷,mamicode.com
首页 >  
搜索关键字:minimum    ( 3256个结果
[leetcode] Triangle
TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given...
分类:其他好文   时间:2015-01-08 13:17:54    阅读次数:179
Leetcode:Palindrome Partitioning II
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:其他好文   时间:2015-01-08 13:09:06    阅读次数:175
[LeetCode] 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-01-08 12:56:21    阅读次数:112
[LeetCode] 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-01-08 12:51:24    阅读次数:114
Fast algorithm to compute minimum volume oriented bounding box
Computing minimum volume bounding box is a hard problem in computer science. Exact algorithm costs O(n3) time complexity.However, for lots of applicat...
分类:其他好文   时间:2015-01-08 10:58:58    阅读次数:239
leetcode 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-01-07 23:21:50    阅读次数:181
[Leetcode][JAVA] Triangled
TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given...
分类:编程语言   时间:2015-01-07 23:20:51    阅读次数:267
LeetCode Solutions : Find Minimum in Rotated Sorted Array
【算法思路】利用折半查找的思路去查找这个最小元素 【编程步骤】 * 1. 如果数组num只有一个元素,则所求的最小的元素就是它了; * 2. 若left到right位置的元素严格递增,则最小的元素为num[left],如左图 否则,如右图,利用折半查找,若left到mid递增有序,则最小元素必出现在右边部分:mid+1到right; 若mid到right递增有序,则最小元素出现在左边部分:left到mid; while(left<right){ if(num[left]<num...
分类:其他好文   时间:2015-01-07 16:55:49    阅读次数:171
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 the element on top of the stack.top() -- Get ...
分类:其他好文   时间:2015-01-07 15:01:43    阅读次数:106
[LeetCode]111 Minimum Depth of Binary Tree
https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/http://blog.csdn.net/linhuanmars/article/details/19660209/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSoluti..
分类:其他好文   时间:2015-01-06 15:47:12    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!