7 kyu
Complete The Pattern #3 (Horizontal Image of #2)
682 of 2,201DivyanshBatham
Description:
Task:
You have to write a function pattern which creates the following pattern upto n number of rows. If the Argument is 0 or a Negative Integer then it should return "" i.e. empty string.
Pattern:
(n)
(n)(n-1)
(n)(n-1)(n-2)
................
.................
(n)(n-1)(n-2)....4
(n)(n-1)(n-2)....43
(n)(n-1)(n-2)....432
(n)(n-1)(n-2)....4321
Examples:
pattern(4):
4
43
432
4321
pattern(6):
6
65
654
6543
65432
654321
Note: There are no blank spaces
Hint: Use \n in string to jump to next line
ASCII Art
Fundamentals
Similar Kata:
Stats:
Created | Jun 6, 2015 |
Published | Jun 6, 2015 |
Warriors Trained | 3857 |
Total Skips | 445 |
Total Code Submissions | 8185 |
Total Times Completed | 2201 |
JavaScript Completions | 682 |
Ruby Completions | 211 |
Python Completions | 761 |
Haskell Completions | 104 |
C# Completions | 140 |
C++ Completions | 403 |
Total Stars | 38 |
% of votes with a positive feedback rating | 90% of 423 |
Total "Very Satisfied" Votes | 348 |
Total "Somewhat Satisfied" Votes | 66 |
Total "Not Satisfied" Votes | 9 |