Hello Everyone,
I am going to solve a coding porblem which is called Pyramid Array
I want from you to help me collect explain the problem as much as you can so I understand the problem very well and to get tips and hints that helps me before starting solving this challenge.
I think the page you link to is pretty self explanatory. Look at their example and see if you can identify the pattern. Look at the value they have for pyramid(3). Notice how there are three elements in the resulting array, where the length of each array inside that array is incremented by one. So the first item has 1 element, the second array has 2 elements and the third item has 3 elements.
How does the number of nested arrays relate to the value passed into the function? How does the number of elements in each of those nested arrays relate to the value passed in? What would you expect pyramid(4) be? Possibly [ [1], [1,1], [1, 1, 1], [1, 1, 1, 1] ]?
Just take a minute to understand the pattern and then write the function to replicate the pattern.