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.
Reraised as issue with more detail
Fixed by last python update.
finally approved :)
First line run, minimum of arr is 1, arr.index() returns the first index (searching from the left) of an occurrence of 1, which happens to be 0. m gets 0.
Next, sorted() is called on arr and returns a new sorted array, [1,1,2,3,4]. On the other side, arr[m:] with m=0 becomes arr[0:] gives [1,2,3,4,1]. arr[:m] with m=0 becomes arr[:0] gives []. [1,2,3,4,1]+[] gives [1,2,3,4,1]. [1,1,2,3,4] == [1,2,3,4,1] evaluates to False.
.
A bit late but i have now approved it!
oh hell yeah, I'll join it, that sounds like a much better workflow
Also, I forgot to add: there is a #help-author channel on the Codewars Discord when you can ask for help/advice, or get people to review your draft katas before publishing them; this can help you iron-out any early problems (and also determine if your idea is judged "interesting" enough before you spend hours working on it).
You're welcome, glad it was useful;
Note also that you can read the Test Cases of any kata you have solved - recently approved katas, or ones with high approval ratings can be a good source of inspiration if you want to get a feel for the Codewars test suite, and good practices (it's how I figured this stuff out myself).
Best wishes for your kata authoring in future, I hope you stick with it!
this is a HUGE help, obviously for this Kata but also to understand for future Katas. If I can get this process down I think I'll really enjoy writing them :)
This comment is hidden because it contains spoiler information about the solution
hello sir-- I wrote random tests but not sure about the syntax to execute-- would you help me please? It's my first Kata and I can't find the syntax in docs/Google...
Many thanks in advance!
The python code works fine, but the test execution syntax is throwing an error:
thank you! I'll fix it up :)
This comment is hidden because it contains spoiler information about the solution
Loading more items...