Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
My mistake. Fixed in the fork.
Fixed in the fork. It was a result of backtracking, but for some reason it didn't affect my solution. I've placed cuts at the end of most of the test predicates.
Why bother flooring to Int at all? The tests pass wihtout it.
Yes, I hadn't thought of the complexity of
list.insert
in particular (list.pop(0)
is basically justn,list=list[0],list[1:];return n
so I don't think it's too bad, but it's possible I just don't understand how slicing works under the hood). Also, I will admit I was tempted to try and golf this answer, but that would probably just lead tolambda a,b:sorted(a+b)
as mentioned in the original, so that's pretty boring.It's not pretty, but I'm beat again. Learning functional programming has ruined my golfing ability.
This comment is hidden because it contains spoiler information about the solution
What is the desired behavior for empty strings
""
?Your funciton bugs out on strings of odd length... is the result undefined for such strings, or is that an oversight on your part?