Pregunta de entrevista de BAE Systems

Two technical questions, coding and an electrical circuits question.