7 kyu
Down Arrow With Numbers
464 of 932tfKamran
Description:
Given a number n
, make a down arrow shaped pattern.
For example, when n = 5
, the output would be:
123454321
1234321
12321
121
1
and for n = 11
, it would be:
123456789010987654321
1234567890987654321
12345678987654321
123456787654321
1234567654321
12345654321
123454321
1234321
12321
121
1
An important thing to note in the above example is that the numbers greater than 9 still stay single digit, like after 9 it would be 0 - 9 again instead of 10 - 19.
Note:
- There are spaces for the indentation on the left of each line and no spaces on the right.
- Return
""
if given n<1.
Have fun!
Algorithms
Similar Kata:
Stats:
Created | Nov 13, 2015 |
Published | Nov 13, 2015 |
Warriors Trained | 2369 |
Total Skips | 146 |
Total Code Submissions | 5929 |
Total Times Completed | 932 |
JavaScript Completions | 392 |
Python Completions | 464 |
Ruby Completions | 105 |
Scala Completions | 10 |
Total Stars | 58 |
% of votes with a positive feedback rating | 88% of 215 |
Total "Very Satisfied" Votes | 173 |
Total "Somewhat Satisfied" Votes | 34 |
Total "Not Satisfied" Votes | 8 |