in reply to finding duplicates in an array
Hey. I have a question really similar to this one:
Let's say I have an array with:
(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (2, 3) (2, 3) (4, 1) (5, 1)
If I wanted to get rid of duplicates of (x, y) AND get rid of any duplicates of the reverse (y, x), how would I best do this?
ie, I want to end up with:
(1, 1) (1, 2) (1, 3) (1, 4) or (4, 1) (1, 5) or (5, 1) (2, 3)
Really appreciate any suggestions! Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: finding duplicates in an array
by bobf (Monsignor) on Feb 05, 2008 at 03:10 UTC |