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.
@Pankwood, @thanhdoan
Problem here is not a O()
Problem here is an IEnumerable in C#.
Possible, it can be infinite.
You can try it with simple method: https://gist.github.com/IDontKnower/5df0a1a5d957ec37f719674eafeeacf4
I think, in my example it's realy hard to get GroupBy or Sort)
Maybe some issue in c# tests
Description says
"In ["NORTH", "SOUTH", "EAST", "WEST"], the direction "NORTH" + "SOUTH" is going north and coming back right away.
The path becomes ["EAST", "WEST"], now "EAST" and "WEST" annihilate each other, therefore, the final result is [] (nil in Clojure)."
But second test is
public void Test2() {
string[] a = new string[] {"NORTH", "WEST", "SOUTH", "EAST"};
string[] b = new string[] {"NORTH", "WEST", "SOUTH", "EAST"};
Assert.AreEqual(b, DirReduction.dirReduc(a));
}
If i understand task well, array 'b' must be empty