Pergunta de entrevista da empresa Two Bulls

Two sum with time and space complexity constraints.