6 kyu
Pyramid Array
1,018 of 19,306sahglie
Description:
Write a function that given an integer n >= 0
, returns an array of n
ascending length subarrays, all filled with 1
s.
0 => [ ]
1 => [ [1] ]
2 => [ [1], [1, 1] ]
3 => [ [1], [1, 1], [1, 1, 1] ]
Algorithms
Similar Kata:
Stats:
Created | Apr 5, 2013 |
Published | Jun 13, 2013 |
Warriors Trained | 28368 |
Total Skips | 2141 |
Total Code Submissions | 40971 |
Total Times Completed | 19306 |
Ruby Completions | 1018 |
Python Completions | 4885 |
JavaScript Completions | 4734 |
C# Completions | 767 |
Haskell Completions | 212 |
Swift Completions | 889 |
Go Completions | 905 |
Factor Completions | 25 |
Groovy Completions | 110 |
Scala Completions | 211 |
Clojure Completions | 132 |
CoffeeScript Completions | 19 |
Crystal Completions | 22 |
Dart Completions | 1102 |
Elixir Completions | 194 |
Elm Completions | 104 |
Julia Completions | 81 |
Lua Completions | 385 |
PHP Completions | 753 |
Racket Completions | 92 |
Reason Completions | 17 |
TypeScript Completions | 1344 |
C++ Completions | 1340 |
Rust Completions | 465 |
C Completions | 188 |
Java Completions | 199 |
Total Stars | 284 |
% of votes with a positive feedback rating | 92% of 1913 |
Total "Very Satisfied" Votes | 1637 |
Total "Somewhat Satisfied" Votes | 253 |
Total "Not Satisfied" Votes | 23 |