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 did something similar. As several others have noted, it's an inefficient approach, but it was really quick to write and handled all the test cases so I considered it fit for purpose.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
I did something similar. As several others have noted, it's an inefficient approach, but it was really quick to write and handled all the test cases so I considered it fit for purpose.