码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
Count Primes ——LeetCode
Description:Count the number of prime numbers less than a non-negative number,n.题目大意:给一个int,返回小于它的质数的数量。解题思路:打表。public class Solution { public ...
分类:其他好文   时间:2015-06-25 11:55:16    阅读次数:93
55. Jump Game && 45. Jump Game II
Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents yo...
分类:其他好文   时间:2015-06-25 10:14:11    阅读次数:117
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). Find tw...
分类:其他好文   时间:2015-06-25 09:00:28    阅读次数:135
plus one
1. Question给定一个非负数,用数组存储其各数位,对这个数加一,返回结果。数组中,最高位在数组头。Given a non-negative number represented as an array of digits, plus one to the number.The digits ...
分类:其他好文   时间:2015-06-24 22:21:56    阅读次数:155
【LeetCode】204. Count Primes
Count PrimesDescription:Count the number of prime numbers less than a non-negative number,n.Credits:Special thanks to@mithmattfor adding this problem ...
分类:其他好文   时间:2015-06-24 20:41:51    阅读次数:101
LeetCode64: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 right at any...
分类:其他好文   时间:2015-06-24 00:52:10    阅读次数:107
Leetcode 02 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...
分类:其他好文   时间:2015-06-23 23:08:04    阅读次数:207
Largest Number
Description: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 larges...
分类:其他好文   时间:2015-06-23 11:40:37    阅读次数:100
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 ...
分类:其他好文   时间:2015-06-23 11:35:40    阅读次数:105
Leetcode 227 basic caculator
Implement a basic calculator to evaluate a simple expression string. The expression string contains only?non-negative?integers,?+,?-,?*,?/?operators and empty spaces?. The integer division ...
分类:其他好文   时间:2015-06-22 22:25:46    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!