We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I didn't know about the PadLeft option. 'Preciate your sharing this.
Also, you can start the iterator at i=1 to avoid the "i+1" in the string constructor, then run it until i<=N. It's all the same, of course, but a little more intuitive for folks like me.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
I didn't know about the PadLeft option. 'Preciate your sharing this.
Also, you can start the iterator at i=1 to avoid the "i+1" in the string constructor, then run it until i<=N. It's all the same, of course, but a little more intuitive for folks like me.