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.
The store is always on the left which was spec'd in the problem description.
There wasn't a default test for handling there being a shorter distance corral than the first one though. I think I'll add your test case so that gets covered.
Hey zruF, not seeing it. Maybe it takes some time to show up, or maybe it wasn't formally submitted. Thanks!
You probably figured this out by now, but python3 doesn't have xrange. use range instead.
Did you not run into rounding errors?
I've definitely seen worse Space vs. Time Complexity tradeoffs.
This comment is hidden because it contains spoiler information about the solution
I removed my error handling, since it seemed to be unnecessary. It's also probably better practice to assign len(s)//2 to a variable, but it's too unsatisfying to ruin a one-liner.
Mutable default arguments! It's a feature!
You're pretty good at breaking these :)
Problem is in Python3 this code wouldn't work because xrange in Python2 was changed to range in Python3.
Now that's clever.
what in the hell is this.
Might be a good idea to have a test that punishes the O(n^2) solutions, especially at 6 kata.
If you think this is best practices, you shouldn't vote for best practices.
Agree it's not best practices, but you have to admit it's kind of nice to not have to worry about what kind of nonsense you might have a user pass to you.
Loading more items...