Amazon interview question

Return a list that is unique with a given substring