码迷,mamicode.com
首页 >  
搜索关键字:count-say    ( 197个结果
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-06-10 10:41:04    阅读次数:147
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 a...
分类:其他好文   时间:2014-06-09 15:53:03    阅读次数:246
【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-06-06 19:53:31    阅读次数:203
leetcode第一刷_Count and Say
水题。描写叙述的还挺麻烦的,实际上就是纸老虎,用两个string,一个存上一轮的结果,一个用来更新出这一轮的结果,每次扫描上一轮,统计一个字符出现的次数,然后把这个次数和字符增加到这一轮的字符串中就能够了。class Solution {public: string countAndSay(i...
分类:其他好文   时间:2014-06-05 18:34:43    阅读次数:204
LeetCode: Count and Say [037]
【题目】 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 "one 2, then one 1" or 1211. Given an integer n, generate...
分类:其他好文   时间:2014-05-21 15:20:07    阅读次数:213
Leetcode: Count and Say
一次过 1 public class Solution { 2 public String countAndSay(int n) { 3 if (n <= 0) return ""; 4 int i = 1; 5 String current ...
分类:其他好文   时间:2014-05-16 21:27:59    阅读次数:267
leetcode第一刷_Count and Say
水题。 描述的还挺麻烦的,实际上就是纸老虎,用两个string,一个存上一轮的结果,一个用来更新出这一轮的结果,每次扫描上一轮,统计一个字符出现的次数,然后把这个次数和字符加入到这一轮的字符串中就可以了。 class Solution { public: string countAndSay(int n) { if(n == 0) return ""; ...
分类:其他好文   时间:2014-05-15 04:12:07    阅读次数:289
197条   上一页 1 ... 18 19 20
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!