Hi, I want to remove the duplicate IppiPoints from an array as fast as possible.

IppiPoint* P = new IppiPoint[N];

The array size N is 1520 but approximately first 400 index of it is modified at each iteration. The total number of iterations is image width x image height.. Thus I need a fast solution..Namely, any duplicate of point1 which satisfies

(point1.x = point2.x) && (point1.y = point2.y)

should be removed..

The trivial solution is to check for each point if it matches with the next one..but the running time complexity would then be O(N^2)..Any idea is welcome..