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

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

            return(accumulatorValue);
        }