码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
LeetCode:Container With Most Water
题目描述: 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 endpoints of line i is at (i, ai) and (i...
分类:其他好文   时间:2014-12-25 11:24:50    阅读次数:163
Add Two Numbers
Problem StatementYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes ...
分类:其他好文   时间:2014-12-24 16:08:33    阅读次数:137
[C++]LeetCode: 51 Minimum Path Sum
题目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or r...
分类:编程语言   时间:2014-12-23 14:01:48    阅读次数:218
【LeetCode】Add Two Numbers
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:其他好文   时间:2014-12-23 13:40:36    阅读次数:183
【LeetCode】Multiply Strings 解题报告
【题目】 Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. 【解析】 题意:两个字符串表示的非负整数相乘,用字符串的...
分类:其他好文   时间:2014-12-23 12:32:31    阅读次数:174
LeetCode: Minimum Path Sum 解题报告
Minimum Path SumGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers ...
分类:其他好文   时间:2014-12-22 21:11:52    阅读次数:229
(每日算法)Leetcode -- Largest Rectangle in Histogram(最大实心矩形)
思路:如果时间复杂度要求是O(n 2 )的话,解法比较多也比较好理解。比如可以遍历,对于当前 i 位置上的立柱,计算出以这个i 立柱结尾的最大矩形,然后求出总的最大矩形。 Given  n  non-negative integers representing the histogram's bar height where the width of each bar is 1, f...
分类:编程语言   时间:2014-12-18 22:18:58    阅读次数:219
[LeetCode]Minimum Path Sum
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:其他好文   时间:2014-12-17 20:47:20    阅读次数:167
【LeetCode】Rotate List 解题报告
【题目】 Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 【解析】 题意:把链表循环右移k个结点。 不是...
分类:其他好文   时间:2014-12-17 18:30:18    阅读次数:148
Container With Most Water -- leetcode
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 endpoints of line i is at (i, ai) and (i, 0). Find ...
分类:其他好文   时间:2014-12-17 14:45:13    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!