码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
Gridland ZOJ1037(规律)
Gridland Time Limit: 2 Seconds Memory Limit: 65536 KB Background For years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them ef...
分类:其他好文   时间:2015-04-28 14:07:48    阅读次数:146
Count Primes Total Accepted: 831 Total Submissions: 6167
题目来自:Leetcode https://leetcode.com/problems/count-primes/ Count Primes  Total Accepted: 831 Total Submissions: 6167My Submissions Question  Solution  Description: ...
分类:其他好文   时间:2015-04-27 23:50:05    阅读次数:174
[LeetCode]-003-Longest Substring Without Repeating Characters
网址:https://leetcode.com/problems/longest-substring-without-repeating-characters/ 题意: 求出最长子字符串且不含重复字符 分析: 题意比较简单 只需要注意字符串为空的特殊情况. 字符是char的0-255,不仅仅是26个小写字母. 解法: 一直统计长度,直到有字符被重复为止,再记录被重复的字符的下一位...
分类:其他好文   时间:2015-04-27 23:49:44    阅读次数:126
[LeetCode]-001-Two Sum
网址: https://leetcode.com/problems/two-sum/ 题意: 给一组数,给一个目标值. 这组数里有2个数的和等于目标值,求出这两个数的下标. 提示: 下标从1开始 明确一定有答案 分析: 一定有答案,从而不用对特殊情况进行考虑. 比如: (1)一组数的长度小于2. (2)没有答案 (3)和值等于2个相同下标的数的和 解法: 想法1: 排...
分类:其他好文   时间:2015-04-27 21:56:37    阅读次数:139
SDUT 2158 Hello World!(第一届山东省赛)
Hello World! Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 We know that Ivan gives Saya three problems to solve (Problem F), and this is the first problem. “We nee...
分类:其他好文   时间:2015-04-27 21:49:13    阅读次数:162
[LeetCode]-002-Add Two Numbers
网址:https://leetcode.com/problems/add-two-numbers/ 题意: 可以用来做大数加法, 从低位开始两两相加,如果大于等于10,则进位 提示: (1)l1为null 或 l2为null (2)l1比l2长 或 l2比l1长 (3)l1和l2中的最高位仍然不足以表示两者的和,即需新建结点 解法1: 改变l1的值, 如果l1比l2短,则另接l...
分类:其他好文   时间:2015-04-27 21:46:06    阅读次数:113
leetcode - Count Primes
leetcode -https://leetcode.com/problems/count-primes/Q:Description:Count the number of prime numbers less than a non-negative number,nHint:The number ...
分类:其他好文   时间:2015-04-27 18:10:59    阅读次数:230
LeetCode-Repeated DNA Sequences
题目链接:https://leetcode.com/problems/repeated-dna-sequences/ All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is someti...
分类:其他好文   时间:2015-04-27 09:58:50    阅读次数:110
House Robber
https://leetcode.com/problems/house-robber/You are a professional robber planning to rob houses along a street. Each house has a certain amount of mon...
分类:其他好文   时间:2015-04-27 00:02:21    阅读次数:217
Happy Number
https://leetcode.com/problems/happy-number/Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following ...
分类:移动开发   时间:2015-04-26 22:38:15    阅读次数:172
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!