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