added a return duplicate element from list algo.

added a return duplicate element from list algorithm. Encountered this
problem during a Amazon interview.