Pregunta de entrevista de Capital One

Find first common element in a stack