题目描述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
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
题目描述
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
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
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
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
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
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
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
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