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.
nice
nice work! But the question wanted to return NEW array
Yes, that way the original array that was passed in as a parameter is not modified.
This comment is hidden because it contains spoiler information about the solution
Both commenters before me are fools. This is the most premium way of programming. I would hire this person over the others anyday.
Yes, it is working. But it also mutates the inputArray, which might be unwanted and is considered bad practice. It would be better to keep the function pure and return a new array instead.
Hi fairly new to programming , and this is how I solve mine. Quite proud of my achievement
your solution is perfect example of bad coding
hahaha :D
You don't need to check the
(count > 2)
every iteration (there may be millions of them) - only whencount
changes...Totally agree with you :D, happy coding, see ya :)
Why loser?. We are studying to best practices of code. Does not feels like a loser, that just the beginning to us. I'm improved too much as i late starting challenges in CodeWars, so we have to practice to be good enough. Don't get bad. See ya! =P
This solution does not work if the shortest word is at the end with no trailing whitespace.
Makes me recall the meme with Borakc Obama "if if if if if if"
This solution is computing twice each expression, probably not the best performance.
Loading more items...