6 kyu
Look and say numbers
1,764 of 2,639Svenito
Description:
There exists a sequence of numbers that follows the pattern
1
11
21
1211
111221
312211
13112221
1113213211
.
.
.
Starting with "1" the following lines are produced by "saying what you see", so that line two is "one one", line three is "two one(s)", line four is "one two one one".
Write a function that given a starting value as a string, returns the appropriate sequence as a list. The starting value can have any number of digits. The termination condition is a defined by the maximum number of iterations, also supplied as an argument.
Recursion
Algorithms
Similar Kata:
Stats:
Created | Aug 12, 2014 |
Published | Aug 12, 2014 |
Warriors Trained | 6467 |
Total Skips | 643 |
Total Code Submissions | 8521 |
Total Times Completed | 2639 |
Python Completions | 1764 |
JavaScript Completions | 851 |
Ruby Completions | 63 |
COBOL Completions | 3 |
Julia Completions | 13 |
Total Stars | 129 |
% of votes with a positive feedback rating | 90% of 484 |
Total "Very Satisfied" Votes | 392 |
Total "Somewhat Satisfied" Votes | 86 |
Total "Not Satisfied" Votes | 6 |