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.
holy shit...
Dude next time please look at your code for just one second...
This if else thing is just horrible. You could've just checked if it is not divisible by 2 and then append _ . There is no need for coding the same loop twice
This comment is hidden because it contains spoiler information about the solution
Done!
This comment is hidden because it contains spoiler information about the solution
Just a waste of resources. Use a simple loop and 2 variables and you get O(n) time and O(1) space...
This is definitely not a best practice...
It looks handy and short but that's it.
@hobovsky Your comment is actually a little bit misleading. You need to calculate n! because it's not possible to rewrite the formula so it doesn't contain n!.
What you can do is rewrite the formula in a way you can calculate the result more efficiently but you always have to calculate n!
As many top 'coding craftsman' already said, when your variable needs an explaining comment you did something wrong
just another case of linq abuse...
Ok I'm sorry about that one. One of the LINQ statements I used was responsible for the weird error messages. So definitely my own error.
I'm not trying to say that it's not possible to pass the tests (even if I dont agree with your point of view that nwse isn't equal to []).
So sure there's something wrong with my algorithm.
But still the error messages are incorrect.
Again how can both be string[2] when expected string length is 5 and actual is 4?
C# test cases seem to be broken.
Given: {"North", "East", "West", "South"}, Expecting {"North", "East", "West", "South"}
But when walking north, then east, then west, and finally south I'm right where I was at the beginning so correct output should be an empty array
Also I get quite weird error messages like:
Expected and actual are both <System.String[2]>
Values differ at index [0]
Expected string length 5 but was 4. Strings differ at index 0.
Expected: "NORTH"
But was: "EAST"
-----------^
How can both be string[2] when expected string length is 5 and actual is 4?
C# test cases dont work. My function works perfectly but the tests are telling me that the passed in string is wrong formatted.
C# test cases are broken. For rgb(255, 255, 255) it says my algortihm returns FFFF2C but testing it on my own my algorithm returns FFFFFF.
Loading more items...