public int Solution(string input) { List <Instruction> instructions = instructionsRepository.GetInstructions(input); int accumulatorValue = accumulator.CalculateAccumulatorValueAfterProgramTerminates(instructions); return(accumulatorValue); }
public int Solution(string input) { List <Instruction> instructions = instructionsRepository.GetInstructions(input); int accumulatorValue = accumulator.CalculateAccumulatorValueBeforeAnyInstructionIsExecutedSecondTime(instructions); return(accumulatorValue); }