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.
How are we suppose to handle katakana (Japanese) alphabet? All my tests passed except with katakana alphabet.
Spent too much time on this, so I refuse to forfeit. I wonder if there is an issue with the test or my cose is bad. In case of my bad code, I would appreciate to know how to fix/improve it as it keeps failing on these : [] should equal [[], [], [], [], [], [], [], [], [], [], [], [], []]
[[5], [], [], [], [], [0], [], [], [], [], [], []] should equal [[5], [], [], [], [], [0], [], [], [], [], [], [], []].
Thank ou
Thank you for your quick reply. I can understand that the solution should be written in Java, not Python. I jumped blindly coding in python as it's the one I am training thinking that python was asked. Correct me if I am wrong.
Thank you
Regards
No, it's not. That's
Javascript
's function you are referring to.Edit: And as I've said before this kata haven't yet translated to Python
Indeed, but the normal way of decalring raised errors,
def addUsername(list):
^^^^^^^^^^^
that's what surprised me. looking at others solutions, it seems that everyone used function addUsername(list){......} declaration. I don't understand why. is it still python??
Were you not in the python section of the training page?
https://www.codewars.com/kata/582a53ed261c2af9d200018c/train/pythonEdit: There haven't been a Python translation on this kata
I don't understand why funtion .... {} was used instead of def .... to declare and write the function. Did I miss something? The structure is different, as far as I know, defining a function in python is done using the keyword def. Why is it that function is used in this case?
Thank you for your reply.
Regards
My algorithm passed all test till a cetain number (for i:1 to n<8000), but failed when n>=10000 due to algorithm time execution (o=(10000)). I need a better data structure to handle this in a shorter time. Refactoring to reduce an algorithm complexity is not my favorite.
Since you seem to be working in Python: I checked the 3 preloaded tests and they are fine; they are the same as the ones used in the kata description.
The only additional one is the edge case test with empty array,
[]
.You shouldn't use the Issue tag for these kind of comments, the mods will tell you to raise a question or just post a comment - state your specific problem also, right now you are too vague.
By the way the kata has been solved almost 5,000 times in Python so it's unlikely something is wrong with the kata rather than your code.
I think there is an issue with this kata. I see a discrepency between the example in the explanation vs those in the test.