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.
still better than those hacky stream solutions
Matematician:-)
This works pretty good for short stock lists but performance will degrade dramatically with longer list as its complexity is O(n²).
This is great, but you for each number you check if it is divisible. My name is C4rbyn3m4n look at my code. It is only 2 lines of code and runs more efficiently. If you like it please upvote it. Thanks and have fun programming!
This is a bad practice since you are changing the original Object:
Thank you sir!
Thank you. I corrected it.
instead of two if loops, you could used String.trim() to remove the whitespaces.
The Test Case has "expected" and "was" swapped.
Should be:
C# translation finished.
Thanks for your feedback but think of that as:
<-WEST--<-WEST--<-WEST-- not the same as <-WEST--
Thanks! I just wondered if repeats counted as telling someone to go "WEST" three times consecutively might be the same as telling them to go "WEST". It may be worth having in the description since I originally assumed that saying "WEST" three times should be truncated to one "WEST", which is why my solution isn't working. However, I may be the only one confused by this.
There is no possible annihilation in "NORTH, WEST, WEST, WEST" so you must keep it such as.
Just a question. Are repeated cardinal directions supposed to be included in our answer as well? For instance, if I were given an array containing "NORTH, SOUTH, NORTH, WEST, WEST, WEST" should it evaluate to "NORTH, WEST, WEST, WEST" or "NORTH, WEST"?
This comment is hidden because it contains spoiler information about the solution
Loading more items...