Pregunta de entrevista de Tesla

Leetcode style coding challenge. Questions can vary by team