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.
This is the way!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
What is the need for (petals - 1)
it does not impact performance. however, as you can see for yourself, the arrow syntax introduced in ES6 allows for more concise code, which is why it has become very popular among devs. although you don't need to type out the function keyword in codewars since it's already there, people still like to change the declaration into arrow syntax as it reflects a modern mindset (and also your code is more likely to be separate from a lot of other solutions if you do it differently xD)
why does this work?
this works if a==b since margin >= 0, however it is better not to implement a sgn function this way since it can cause ZeroDivisionError under different circumstances
This comment is hidden because it contains spoiler information about the solution
nothing. not a thing. two things. look up one, then the other!
This comment is hidden because it contains spoiler information about the solution
Since A>=0 and B>=0, the text should be changed to "The numbers in the expression will always be non-negative"
They aren't. You have to make such a dataset (list/set/dictionary etc.) yourself.
Kyu is the ranking system of users as well as the difficulty level for kata in codewars. New users start at 8 kyu and gradually go up as they complete more kata. Kata are tagged with difficulty levels also measured in kyu (the easiests marked 8 kyu), which can help users decide whether a kata is too difficult, too easy or the right level for them. Usually kata of 8 and 7 kyu difficulties are considered beginner level kata, they are relatively easy.
It is a common mistake people do in this kata. For example see this.
Simply put, there is a difference between sorting a list of
string
s and sorting a list ofint
s.Loading more items...