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.
As it reads
{1,4,4,4,0,4,3,3,1} becomes:
{1,12,null,null,0,4,6,null,1}
This comment is hidden because it contains spoiler information about the solution
I'm confused how this solution doesn't produce {1,12,8,4,0,4,6,3,1} for Input: {1,4,4,4,0,4,3,3,1} but I couldn't figure out any one liner so what do I know.
I was getting this due to code running longer than the timeout
Test's don't really match expectations based on instructions.
Test Cases Incorrect for Submission - Console.WriteLine'd out on C# Test
The instructions do not specify any race is a ZERO value, and Tests within the ShouldBeATie Section show that the zeros do not count towards score:
Good: 1 0 0 0 0 0
Evil: 1 0 0 0 0 0 0 (From ShouldBeATie)
Cannot make all tests pass by accounting for 0 value or not!
Time: 671ms Passed: 3 Failed: 3
Test Results:
GoodVsEvil
EvilShouldWin
Log
Good: 1 1 1 1 1 1
Evil: 1 1 1 1 1 1 1
Good: 1 1 1 1 1 1 -- Is not EvilShouldWin (Is Infact a Draw)
Evil: 0 1 1 1 1 1 1 -- Is not EvilShouldWin (Is Infact a Draw)
✔ 1 assertion passed
✘ Expected string length 48 but was 45. Strings differ at index 15.
Expected: "Battle Result: Evil eradicates all trace of Good"
But was: "Battle Result: No victor on this battle field"
--------------------------^
Completed in 0.026539ms
GoodShouldTriumph
Log
Good: 0 0 0 0 0 10
Evil: 0 1 1 1 1 0 0
Good: 1 1 1 1 1 1
Evil: 0 0 1 1 1 1 1
Good: 0 1 0 0 0 0 -- Is not GoodShouldTriupmh (Is Infact a Draw)
Evil: 1 0 0 0 0 0 0 -- Is not GoodShouldTriupmh (Is Infact a Draw)
✔ 2 assertions passed
✘ Expected string length 38 but was 45. Strings differ at index 15.
Expected: "Battle Result: Good triumphs over Evil"
But was: "Battle Result: No victor on this battle field"
--------------------------^
Completed in 0.00101ms
ShouldBeATie
Log
Good: 1 0 0 0 0 0
Evil: 1 0 0 0 0 0 0
Good: 0 0 0 0 0 0
Evil: 0 0 0 0 0 0 0
Good: 1 1 1 1 1 1
Evil: 1 0 1 1 1 1 1
Good: 1 0 0 0 0 0
Evil: 1 0 0 0 0 0 0
Good: 0 1 0 0 0 0
Evil: 0 1 0 0 0 0 0
Good: 0 1 0 0 0 0
Evil: 0 0 1 0 0 0 0
Good: 0 1 0 0 0 0
Evil: 0 0 0 1 0 0 0
Good: 0 0 1 0 0 0
Evil: 0 0 0 0 1 0 0
Good: 0 0 0 1 0 0
Evil: 0 0 0 0 1 0 0
Good: 1 0 0 0 1 0 -- Not A Tie (Good Wins)
Evil: 0 0 0 0 0 1 0 -- Not A Tie (Good Wins)
✔ 9 assertions passed
✘ Expected string length 45 but was 38. Strings differ at index 15.
Expected: "Battle Result: No victor on this battle field"
But was: "Battle Result: Good triumphs over Evil"
--------------------------^
Completed in 0.000577ms