Amazon interview question

Same dataset, cut duplicates out