You are viewing a single comment's thread. Return to all comments →
I don't understand why all of the Editorial code is so complicated. You can simply sort the list and then loop through in one pass.
https://www.hackerrank.com/challenges/cut-the-sticks/submissions/code/12092076
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the sticks
You are viewing a single comment's thread. Return to all comments →
I don't understand why all of the Editorial code is so complicated. You can simply sort the list and then loop through in one pass.
https://www.hackerrank.com/challenges/cut-the-sticks/submissions/code/12092076