Pregunta de entrevista de Rivian

Some leetcode question about memory