Pergunta de entrevista da empresa IBM

Problem solving question- don't worry about being right or wrong, just clearly walk them through your thought process