Hey @yashsharma4304
Outer loop is self explanatory
There are n rows in pattern so we are running it for n times
Now coming to Inner loops (In pattern Inner loops means working for each row at a time)
1st inner loop
So First observe that in 1st row there are n-1 space then in next n-2 then in next n-3 and so on
So first loop print spaces n-row times
.
Now observe that each row is first printing increasing sequence followed by dec seq.So we break each seq in a loop .
2nd Inner loop for increasing seq
Here observe inc seq starts from row number and print for row times
3rd loop for decreasing sequence
Here observe that it starts from 2*row-2 and print for row -1 times