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.
Thank you. You are right with the int but I'm not a huge fan of non obvious implicit casts :)
For a second I thought
-->
is a new operator that I haven't seen before :DThe random tests never test for random replace digits. For example this solution would fail with a longer digit sequence: https://www.codewars.com/kata/reviews/5db32a352010cb0001d90b4d/groups/5db625412010cb0001a17df9
Solution setup is missing return type on the function.
The original Kata actually asks for this:
(Note: Your function should modify the input rather than creating a new array.)
so it should probably be void and the array passed as refLove it :)
Upvoted for clean structure and variable naming. One hint (which I didn't know about for a long time myself): You can move the predicate (which is in your where clause) into Count() directly because it has an overload supporting that. So you could get rid of the extra Where(). But maybe you already knew :)
Yep, very confusing. Please fix the sample test. Also the constructors for the Node class in the description are wrong. Instead of public Node(T data) it should be public Node(T data)
Because .Reverse() (as most LINQ functions) do not modify the instance that you are calling it from but instead returns an IEnumerable. You need to do something with that returned value
In the C# translation the order of actual and expected values in Assert.AreEqual(...) is flipped, which gives confusing errors. The expected value should be the first parameter
This comment is hidden because it contains spoiler information about the solution