Pergunta de entrevista da empresa BAE Systems

Basic programming task to implement an algorithm