Pergunta de entrevista da empresa Axon

Program was a LC graph theory style problem.