Pergunta de entrevista da empresa Goldman Sachs

DSA question based on stack