Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Last active November 4, 2020 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbvf50mobile/c336520d40ddfdc56744c418dbfab261 to your computer and use it in GitHub Desktop.
Save lbvf50mobile/c336520d40ddfdc56744c418dbfab261 to your computer and use it in GitHub Desktop.
Just PHP FUN 144.
<?php
# https://www.codewars.com/kata/515f51d438015969f7000013 Pyramid Array.
function pyramid($n) {
$ans = [];
for($i = 0; $i < $n; $i += 1) array_push($ans,array_fill(0,$i+1,1));
return $ans;
}
@lbvf50mobile
Copy link
Author

1:06

@lbvf50mobile
Copy link
Author

1:09 - 3 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment