It's really childish to ask this question but really want an optimal solution for this. I have an array of string
("a1,a2", "a3,a4", "a2,a1", "a5,a3")
and I want to Display
("a1,a2", "a3,a4", "a5,a3")
i.e. the first string is in, its duplicates are omitted.
Note: the order of the elements must be preserved