码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
LeetCode:Gray Code 题解
题目描述:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total n...
分类:其他好文   时间:2014-05-26 21:30:04    阅读次数:296
【LeetCode】Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-05-26 18:46:20    阅读次数:251
Rotate List
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.思路:这道...
分类:其他好文   时间:2014-05-26 00:06:39    阅读次数:250
LeetCode: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 i...
分类:其他好文   时间:2014-05-25 21:36:52    阅读次数:268
LeetCode: Rotate List [060]
【题目】 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. 【题意】 给定一个链表L,和非负数K,要求把链表的后k个节点移到链表前 【思路】 先将指针指向指向倒数第K个节点,然后...
分类:其他好文   时间:2014-05-25 18:20:06    阅读次数:252
LeetCode: Jump Game [054]
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. For example:...
分类:其他好文   时间:2014-05-24 20:44:39    阅读次数:221
LeetCode: Merge Intervals [055]
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. ...
分类:其他好文   时间:2014-05-24 14:18:27    阅读次数:193
[LeetCode] [Trapping Rain Water 2012-03-10]
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....
分类:移动开发   时间:2014-05-23 03:59:43    阅读次数:364
LeetCode: Jump Game II [044]
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of ju...
分类:其他好文   时间:2014-05-22 17:02:20    阅读次数:244
LeetCode: Multiply Strings [042]
【题目】 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. 【题意】 给定用字符串表示的整数,返回两个数的乘积结果字符串。两个数字都非负,且能任意大。 【思路】 1. 考虑其中一个数是0的情况 2. 模拟乘法运算...
分类:其他好文   时间:2014-05-21 13:45:37    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!