摘要:
Description:Count the number of prime numbers less than a non-negative number,n.本题给定一个非负数n,让我们求小于n的质数的个数,解题方法就在第二个提示埃拉托斯特尼筛法Sieve of Eratosthenes中,这个算... 阅读全文
摘要:
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases.Notes:It is intended for this problem to be specified ... 阅读全文
摘要:
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... 阅读全文
摘要:
题目描述: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 si... 阅读全文
摘要:
Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about th... 阅读全文
摘要:
注:借鉴了 http://m.blog.csdn.net/blog/lsg32/18712353在Github上提供leetcode有:1、https://github.com/soulmachine/leetcodehttps://github.com/soulmachine/leetcode/t... 阅读全文
摘要:
2015-06-03罗马数字以前接触过I到VIII比较多,直到遇见这个题目才知道更详细。阿拉伯数字和罗马数字之间的转换最重的是了解罗马数字的规则。罗马数字规则:(总结)1, 罗马数字共有7个,即I(1)、V(5)、X(10)、L(50)、C(100)、D(500)和M(1000)。罗马数字中没有“0... 阅读全文