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 am not sure if that break condition is necessary or not, I had pretty much the same answer as yours without the break, since the while loop has the break condition and it passed all the tests.
Can you explain the purpose of that break condition?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Priyanka and Toys
You are viewing a single comment's thread. Return to all comments →
I am not sure if that break condition is necessary or not, I had pretty much the same answer as yours without the break, since the while loop has the break condition and it passed all the tests.
Can you explain the purpose of that break condition?