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.
1, this test should pass (per the "return empty array when n == 0" rule):
Assert.AreEqual(new double[] { }, Tribonacci(new double[] { 1, 5, 7 }, 0));
2, tests like this should be removed:
Assert.AreEqual(new double[] { 300 }, Tribonacci(new double[] { 300, 5, 7 }, 0));
Assert.AreEqual(new double[] { 0 }, Tribonacci(new double[] { 8, 5, 7 }, 0));
In C#, Attempt returns this EXTREMELY BROKEN response:
Testing for signature: 1, 5, 7 and n: 0
Expected and actual are both <System.Double[1]>
Values differ at index [0]
Expected: 0.0d
But was: 300.0d
Instructions: if n==0, then return an empty array.
So this should pass:
Assert.AreEqual(new double[] { }, Tribonacci(new double[] { 1, 5, 7 }, 0));
Also, if I return a double[] { 0 }, I get the error:
Expected and actual are both <System.Double[1]>
Values differ at index [0]
Expected: 1.0d
But was: 0.0d
If I leave the starting value alone, then I get the first error above.