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.
I agree with you! 😂 Umayer you did a good job on this one, but try to rethink your solution using the KISS principle 😊
Cool
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Excellent points. I agree, this should not have been upvoted as Best Practice.
This solution does use
O(number/3)
memory. It is possible to solve it in much less memory.The debates about
goto
andcontinue
are eternal andNever say Never
. It's highly recommended to avoid using these features, but in some particular seldom cases they can be really helpful to solve the existing problem and keep code clean. There is even a special chart inComplete Code
aboutgoto
:D I'm 100% agree with you thatcontinue
could be ommitted here as well as with others marks.i and j are any two indices in the array. If one element in the array is larger than another one, change it to the difference between the two.
Sorry, but this Kata is just weird. I do not understand the description. This is so unlogical and not correct. You can't just come with i and j without saying anthing about them... What is i? What is j?
I Marked it as best practice. Because it is at least slightly structured to some functions. And its somehow readable. Not only one long spagetti. Maybe because it seems somehow similar to my solution :D.
Obviously you do know the count function - but why don't you also use it to count your duplicates???
How on earth is that a best practice? It cannot get any more complicated... :-)
This is definitely not a best practice.... :-)
I completely agree. The three criteria are very poorly defined, and the explanation is also full of holes.
To me a poor Kata is one where it takes longer to understand the problem than it does to come up with a solution.
Loading more items...