Pergunta de entrevista da empresa General Motors (GM)

Two pointer leet code question