Please , explain how to solve this problem . Cannot understand the logic
Hollow Diamond Pattern Question
Hi @sarthak_gupta, pls divide this problem into 2 parts. In first part print the upper half and in second part print the bottom part.
In both the parts first print required no. of spaces, then 1 asterisk, then again required no. of spaces and then again 1 asterisk.
Pls try this question on paper and figure out that in one line how many no. of spaces are printed and what is it’s relation with the line no. and length of pattern. Try to figure out the traid/pattern in no. of spaces across different lines.
Also first try it with _ underscores first instead of spaces like this:
_ _ _ *
_ _ * _ *
_ * _ _ _ *
* _ _ _ _ _ *
_ * _ _ _ *
_ _ * _ *
_ _ _ *
Hope this helps