Pergunta de entrevista da empresa Goldman Sachs

one code question and two behaviour question