Amazon Interview Question

Return a list that is unique with a given substring