Pattern inverted glass hour

What logic should i need to use to solve this prblm because when i unlocked the editorial view the prgm was in JAVA for which i don’t have any idea …Can some one let me know the logic

@Legendankit 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 2N-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.

Refer this code. Dry run it and try to understand.

Thank you got your point