Think about the question. So starting at zero, you need to print (2x + 1) stars (where 0 <= x <= length) for each row. So using this equation and writing down number of stars for each level and try using a simple nested-for loop to solve this.
Remember that since I started at 0, if you decide to start at one, the equation is now (2x - 1) for each row