Pergunta de entrevista da empresa Arista Networks

An average difficulty problem on leetcode