Pergunta de entrevista da empresa IBM

Previous experience, regular algorithm questions.