6 kyu
Stair number [easy]
62 of 98nicotina04
Description:
Let's look at the number 12343.
This number differs by 1 in all adjacent digits. This number is called the 'Stair number'.
When number's length is given, write a function to find out how many Stair numbers are in total length. (Testcases are never start with zero.)
Returns the remainder of the answer divided by 1000000007 (1e9 + 7)
/Input/
1 <= n <= 1000 // n is integer.
/Example Output/
solution(1) returns 9.
solution(2) returns 17.
Dynamic Programming
Algorithms
Similar Kata:
Stats:
Created | May 13, 2019 |
Published | May 13, 2019 |
Warriors Trained | 933 |
Total Skips | 117 |
Total Code Submissions | 887 |
Total Times Completed | 98 |
JavaScript Completions | 62 |
C++ Completions | 42 |
Total Stars | 19 |
% of votes with a positive feedback rating | 80% of 40 |
Total "Very Satisfied" Votes | 28 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 14 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |