码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
LeetCode 415. Add Strings
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 题意:给定以字符串形式表示的两个非负整数num1和num2,返回这两个整数的和。No ...
分类:其他好文   时间:2018-01-31 01:08:14    阅读次数:182
[Leetcode] Container With Most Water
Container With Most Water 题解 题目来源:https://leetcode.com/problems/container with most water/description/ Description Given n non negative integers a1, a ...
分类:其他好文   时间:2018-01-30 17:00:25    阅读次数:127
[LeetCode] Cut Off Trees for Golf Event 为高尔夫赛事砍树
You are asked to cut off trees in a forest for a golf event. The forest is represented as a non-negative 2D map, in this map: 0 represents the obstacl ...
分类:其他好文   时间:2018-01-29 22:35:43    阅读次数:275
LeetCode OJ 之 Number of Digit One (数字1的个数)
题目: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. For example: Given n = 13, R ...
分类:其他好文   时间:2018-01-29 11:41:39    阅读次数:126
LintCode 655. 大整数加法
以字符串的形式给出两个非负整数 num1 和 num2,返回 num1 和 num2 的和。 样例 给定 num1 = "123",num2 = "45" 返回 "168" class Solution { public: /* * @param num1: a non-negative integ ...
分类:其他好文   时间:2018-01-28 23:23:36    阅读次数:335
Leetcode 523: Continuous Subarray Sum
Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that ...
分类:其他好文   时间:2018-01-28 12:49:20    阅读次数:173
Leetcode 670: Maximum Swap
Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. ...
分类:其他好文   时间:2018-01-28 11:15:36    阅读次数:114
[LeetCode] Min Cost Climbing Stairs 爬楼梯的最小损失
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y ...
分类:其他好文   时间:2018-01-25 00:26:19    阅读次数:165
Add Strings
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 代码的主要思路就是一位一位相加。具体代码实现过程如下。 但是关注了一下,评论区大神的 ...
分类:其他好文   时间:2018-01-23 23:16:34    阅读次数:203
[LeetCode] 45. Jump Game II Java
题目: 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 m ...
分类:编程语言   时间:2018-01-23 10:56:50    阅读次数:176
2271条   上一页 1 ... 43 44 45 46 47 ... 228 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!