Amazon Interview Question

Find first duplicate in list