Pergunta de entrevista da empresa Cisco

Writing code with stdout and simple sorting