Pergunta de entrevista da empresa Apollo.io

Standard "leetcode" question about traversal of a data structure and computing some values out of it.