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.
Not really the same issue.
For yours, you just have to consider it goes back to 6.
Even negative indexes could be defined that way.
Additionally, the return value is unspecified if all of the letters are shared between the two names (such as LIAM/MILA, CLAY/LACY, ROAN/NORA, etc.).
Based on the reference solution,
"Siblings"
should be returned, but the description uses 1-based indexing, meaning that an index of0
should be undefined.No floating point division involved - only integer division
I guess this can be closed.
You might expect a player attempting a 4kyu kata knows these builtins and bump your requirements consequently.
Looping fast is not that helpful if the expected algorithm doesn't have the same order of magnitude.
Python translation removed. Performance kata's like this can't be balanced in Python. Builtins are too fast and can easily work around expected algorithms. Allowing these builtins makes it impossible for me to make this a 4 kyu problem in Python.
Python translation added. Let me know when you have solved it. If your solution is faster, I'll need it as a reference solution and I might increase the performance constraints a bit more.
ah ok I'll check it out; here are two kata's to keep you busy in the meantime:
-Bump for previous message-
This comment is hidden because it contains spoiler information about the solution
I believe I tried it once, but got horrible performance. I might give it another shot.
Planning to release this kata for Python?
One pass only
Here you can talk about functional programming, which finds its roots in lambda calculus.
But here stops the comparison, because there isn't something close to a computational model here.
Lambda calculus and Turing machine are equivalent computational models because they can solve the same class of problems.
I have the feeling that the comparison you want to bring here is more about functional programming vs. imperative programming.
Adding comments may help as in your solution, kudos for that.
However using a bunch of
if
s that only vary by a word/letter is not very pythonic as well.Meaningful variable names is often much better than a long comment.
If you remove the comments in your solution, it is not much different than this solution, just longer.
Loading more items...