https://leetcode.com/problems/jump-game/Given an array of non-negative integers, you are initially positioned at the first index of the array.Each ele...
分类:
其他好文 时间:
2015-05-07 23:43:45
阅读次数:
125
Add Two NumbersTotal Accepted:58510Total Submissions:268082My SubmissionsQuestionSolutionYou are given two linked lists representing two non-negative ...
分类:
其他好文 时间:
2015-05-07 21:59:52
阅读次数:
96
题目描述Count the number of prime numbers less than a non-negative number, n。本题要求我们求出小于n的数中共有多少个质数。相信大部分同学在刚开始学习C语言的时候估计都写过判断一个数为质数的程序。一般的思路为:bool isPrime(int num) {
int s = sqrt(num) + 1;
for( i...
分类:
其他好文 时间:
2015-05-07 16:46:37
阅读次数:
91
题目描述Determine whether an integer is a palindrome. Do this without extra space.Some hints:
Could negative integers be palindromes? (ie, -1)
—— 负数不为回文If you are thinking of converting the integer to s...
分类:
其他好文 时间:
2015-05-07 14:30:59
阅读次数:
119
题目描述:
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 and return i...
分类:
其他好文 时间:
2015-05-07 12:36:34
阅读次数:
119
Problem:
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinkin...
分类:
其他好文 时间:
2015-05-07 12:28:14
阅读次数:
143
Trapping Rain WaterTotal Accepted:35650Total Submissions:118319My SubmissionsQuestionSolutionGivennnon-negative integers representing an elevation map...
分类:
移动开发 时间:
2015-05-07 00:26:02
阅读次数:
249
【题目】
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). Fin...
分类:
其他好文 时间:
2015-05-06 23:10:19
阅读次数:
391
DescriptionGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the s...
分类:
其他好文 时间:
2015-05-06 22:28:44
阅读次数:
144
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-06 21:16:09
阅读次数:
118