码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
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. 解题思路:一开始想到比较简单的方法是用哈希,建立一个索引与结点的m...
分类:其他好文   时间:2015-02-02 18:15:45    阅读次数:122
【leetcode】Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may be ve...
分类:其他好文   时间:2015-02-01 20:28:26    阅读次数:174
LeetCode[Array]: Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.  For example,  Given [0,1,0,2,1,0,1,3,2,1,2,1],...
分类:移动开发   时间:2015-02-01 17:48:15    阅读次数:191
[leetcode] Jump Game
Jump Game  Total Accepted: 32273 Total Submissions: 118742My Submissions Question  Solution  Given an array of non-negative integers, you are initially positioned at the first index ...
分类:其他好文   时间:2015-02-01 16:14:32    阅读次数:151
leetcode 【 Minimum Path Sum 】python 实现
题目: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...
分类:编程语言   时间:2015-01-31 01:44:45    阅读次数:205
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2015-01-30 15:55:05    阅读次数:196
leetcode 2 Add Two Numbers 方法2
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a l...
分类:其他好文   时间:2015-01-30 10:55:06    阅读次数:293
Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may be ve...
分类:其他好文   时间:2015-01-30 01:26:21    阅读次数:165
LeetCode:Plus One
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. // https://oj.leetco...
分类:其他好文   时间:2015-01-30 00:10:30    阅读次数:202
leetcode.11---------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, 0). ...
分类:其他好文   时间:2015-01-29 17:48:28    阅读次数:180
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!