码迷,mamicode.com
首页 >  
搜索关键字:count-say    ( 197个结果
【Leetcode】【Easy】Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-11-20 01:20:45    阅读次数:185
count-and-say的另一种错误理解
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41257397 今天OJ可好几次,发现总是出错,最后才发现是自己把题目理解错了,想想就觉得好笑。 题目的意思是给定一个整数n,让你求出按照上面规律在执行若干次后所得到的串,其实该算法主要用到递归的思想。 我却把题目意思错误地理解为:对于给定的整数n,对该整数n执行N次上述递归操作后得到的串。例如给定2,得到的结果是1112。 当我将给定整数设定为1000时,果断出现内...
分类:其他好文   时间:2014-11-19 11:18:20    阅读次数:217
LeetCode——Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as ...
分类:其他好文   时间:2014-11-12 19:50:50    阅读次数:164
Count and Say 计数和读法
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-11-10 06:30:28    阅读次数:178
LeetCode Count and Say 数数字
1 class Solution { 2 public: 3 string countAndSay(int n) { 4 if(n==1) return "1"; 5 string str0="",str1="1"; 6 int i,t,count; 7 ...
分类:其他好文   时间:2014-11-08 23:22:00    阅读次数:291
Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-11-04 10:50:13    阅读次数:180
[leetcode]Count and Say
问题描述: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off...
分类:其他好文   时间:2014-10-28 21:49:42    阅读次数:302
count and say
1 ``` 2 class Solution{ 3 string result; 4 public: 5 //根据数组前一个数,count and say 构造出后一个数 6 void generate(string s,string &result) 7 ...
分类:其他好文   时间:2014-10-27 22:54:51    阅读次数:243
leetcode - Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as ...
分类:其他好文   时间:2014-10-25 16:00:23    阅读次数:184
LeetCode Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-10-25 15:50:19    阅读次数:155
197条   上一页 1 ... 15 16 17 18 19 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!