Pergunta de entrevista da empresa Cisco

Asked some puzzles and algorithms.