Domanda di colloquio di General Motors (GM)

Two pointer leet code question