Pregunta de entrevista de Google

Solve a graph and security level question (leetcode).