Pergunta de entrevista da empresa TeleTrader

Combinatory problem - not hard but you do it without paper. Only the whiteboard is allowed.