Pattern problem

Can I get the solution for this pattern? Also, what does N=5 represent in the above pattern?

for n = 5 you have to print this pattern

you can take help from this code


I have commented each step so that you can understand the code

if you have any doubt in code feel free to ask

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.