码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
【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...
分类:其他好文   时间:2015-05-18 18:57:11    阅读次数:119
LeetCode--Count Primes
Count the number of prime numbers less than a non-negative number,n.1.常规思路(计算复杂度为O(n*sqrt(n))),提交后超时。public static boolean isPrime(int m){ bool...
分类:其他好文   时间:2015-05-18 10:32:38    阅读次数:90
leetcode--Gray Code
题目描述 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the se...
分类:其他好文   时间:2015-05-18 09:12:13    阅读次数:118
LeetCode的medium题集合(C++实现)六
1 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. 该题实际就是利用字符串来解决大数的乘法问题。为了...
分类:编程语言   时间:2015-05-17 16:50:18    阅读次数:159
[LeetCode][JavaScript]Jump Game
https://leetcode.com/problems/jump-game/Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array...
分类:编程语言   时间:2015-05-17 12:14:21    阅读次数:109
Java for LeetCode 066 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...
分类:编程语言   时间:2015-05-16 11:47:02    阅读次数:107
Java for LeetCode 064 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.N...
分类:编程语言   时间:2015-05-16 11:45:30    阅读次数:149
Java for LeetCode 061 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->...
分类:编程语言   时间:2015-05-15 22:45:03    阅读次数:167
Count Primes - LeetCode
examination questionsDescription:Count the number of prime numbers less than a non-negative number, nReferences:How Many Primes Are There?Sieve of Era...
分类:其他好文   时间:2015-05-15 07:53:07    阅读次数:388
leetcode-Count Primes
Description:Count the number of prime numbers less than a non-negative number,n 1 int countPrimes(int n) { 2 int i,j; 3 bool *primer = malloc(...
分类:其他好文   时间:2015-05-15 01:17:42    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!