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…
The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 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…
public class Solution { public string CountAndSay(int n) { //1 //11 //21 //1211 //111221 //312211 //13112221 //1113213211 ) { "; } else { var list = new List<string>(); list.Add("); var result = ""; var pre = ""; ; i &l…