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 easy way
Cool!
Just when I think I did good, someone else does it in one line TT
Been practicing python for a week. Need about another year :')
That´s good point.
If this kind of optimization is a bottle neck for you, then you shouln't be using Python anyway over something like C
Yes, theoretically. Your solution is the best one (and very cheap for memory). Now, practically, using loops with conditional branches is something slow in general, and builtin functions like
split
andmin
are optimized in Python, so the benefice if probably not relevant for the inputs that are tested here. It would be interesting to benchmark this.Doesnt this solution conduct two passes? - one for splitting, and one for finding the min? So for larger strings this would be less efficient than a single for loop.
Does this account for differences in punctuation/upper vs lower case?
You can always use isqrt
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Indeed , Short code = Better Life
based
Lol I thought I hit the Jackpot with this one but I guess I am not the unique one... 😅😂
Loading more items...