Pregunta de entrevista de Walmart Global Tech

Live coding question involving arrays