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.
This is my solution, too. I'm using Python 3.7.5
Result for me is timeout on cases 4, 5, and 6.
My original solution, "return sorted(unsorted, key=lambda x: (len(x), int(x)))" times out on cases 3, 4, and 5.
My solution does not involve int -> str conversion, but still times out.
Any suggestions?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
This is my solution, too. I'm using Python 3.7.5 Result for me is timeout on cases 4, 5, and 6. My original solution, "return sorted(unsorted, key=lambda x: (len(x), int(x)))" times out on cases 3, 4, and 5. My solution does not involve int -> str conversion, but still times out. Any suggestions?