Wrote and passed contain-duplicates test.