注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
本帖最后由 pyx115 于 2015-8-12 21:52 编辑
https://leetcode.com/problems/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. 题目有点绕,看不大明白这个序列怎么来的,有没有地友能帮忙解释一下?Thanks.
|