Pergunta de entrevista da empresa Capital One

Find the first common intersection in two stacks