public void FirstStarExample() { int[] input = { 0, 3, 0, 1, -3 }; var result = JumpInterrupting.StepsToExit(input, 0); Assert.Equal(5, result); }
public override string FirstStar() { var input = ReadLineInput().Select(int.Parse).ToArray(); var result = JumpInterrupting.StepsToExit(input); return(result.ToString()); }
public void SecondStarExample() { int[] input = { 0, 3, 0, 1, -3 }; var result = JumpInterrupting.StepsToExitNew(input); Assert.Equal(10, result); }