Doubt in pattern triangle

i have done this question very correctly with passing all the test cases but i have used buch of if -else .
please show me the code with lesser if-else!

Hello @shubham.mehla2000,

You can click here to see my approach of doing this question without using if-else statements.

Hope, this would help.
Give a like, if you are satisfied.

1 Like

thank you sir!
you can put my doubt in resolved