Pregunta de entrevista de Arista Networks

An average difficulty problem on leetcode