题目描述: Description: Count the number of prime numbers less than a non-negative number, n. 解法一: 遍历从1-n的所有整数,查看是否为质数,是质数借助一个则将该整数存入一个容器中,判断一个数是否为质数,可以遍历在 ...
分类:
其他好文 时间:
2016-10-05 00:55:52
阅读次数:
131
Description: Count the number of prime numbers less than a non-negative number, n. ...
分类:
其他好文 时间:
2016-10-04 07:34:07
阅读次数:
90
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2016-10-04 01:33:54
阅读次数:
136
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 ...
分类:
其他好文 时间:
2016-10-02 21:40:16
阅读次数:
127
[题目] 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 ...
分类:
其他好文 时间:
2016-09-29 17:39:01
阅读次数:
134
Balanced Number Problem Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specific ...
分类:
其他好文 时间:
2016-09-28 22:32:57
阅读次数:
218
275. To xor or not to xor 275. To xor or not to xor The sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence A ...
分类:
其他好文 时间:
2016-09-28 15:23:14
阅读次数:
149
question: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the proces ...
分类:
其他好文 时间:
2016-09-26 21:44:58
阅读次数:
191
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 endpo ...
分类:
其他好文 时间:
2016-09-26 00:50:10
阅读次数:
165
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 ...
分类:
其他好文 时间:
2016-09-24 10:36:14
阅读次数:
144