Pattern hourglass inverted

can you please tell me how to code this.

https://hack.codingblocks.com/contests/c/917/1418 - this is the url of the question

@Ayushi21
We take an input N and run 2N-1 iterations in total , that is , there are 2N+1 rows in total.
Till row = N , we print an increasing pattern and then the decreasing one.
For each row , we run 2N+1 iterations as well.
For each row , we first print a decreasing pattern ( the left side of the pattern ) starting from N and print till j <= i and then spaces.
For the right side of each pattern , we print an increasing pattern only if the value of 2
N-j <= i .
Try this out.
This is only for the upper part of the pattern. If you are able to figure this out and then printing the lower half wouldn’t be much difficult.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.