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.
Yes, but kata solutions don't necessarily have to be efficient (unless the kata tests explicitly require them to be such).
this doesnt account for there being no 'needle' though
nice
Assumes all numbers are in range, returns error for if not.
this must be the guy who made chatgpt
https://www.geeksforgeeks.org/python-list-comprehensions-vs-generator-expressions/
??
Here I thought I was being clever... and completely overlooked the simpler solution.
As little-voted as it is right now for best practice, I ran some benchmarks on BenchmarkDotNet out of curiosity and multiplying a number with itself is magnitudes faster than using Pow(n, 2). This is the one
This produces the character for every single element of inp. Kind of slow?
this is a good one
Think of it as any method that returns either a 1 or a 0. The implementation of it in this case is arbitrary since it is implemented by the caller and not within the method that is being tested.
nice :)))
This comment is hidden because it contains spoiler information about the solution
Wouldn't a set be technically faster to check membership than a string, because it's implimented using a hash table (in Python)? e.g. {'a', 'e', 'i', 'o', 'u'}
Loading more items...