Beispiel #1
0
        public int Solution(string input)
        {
            List <Instruction> instructions = instructionsRepository.GetInstructions(input);
            int accumulatorValue            = accumulator.CalculateAccumulatorValueAfterProgramTerminates(instructions);

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

            return(accumulatorValue);
        }