请教leetcode上的count and say# JobHunting - 待字闺中
m*8
1 楼
leetcode上的count and say这题,是一个什么思路?我在另一个帖子上有看到这题的
代码,但是我水平较低,主要想请教一下这题是什么思路。
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 "one 2, then one 1" or 1211.
Given an integer n, generate the nth sequence.
Note: The sequence of integers will be represented as a string.
我看到的帖子是在,http://www.mitbbs.com/article_t/JobHunting/32147785.html
谢谢
代码,但是我水平较低,主要想请教一下这题是什么思路。
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 "one 2, then one 1" or 1211.
Given an integer n, generate the nth sequence.
Note: The sequence of integers will be represented as a string.
我看到的帖子是在,http://www.mitbbs.com/article_t/JobHunting/32147785.html
谢谢