Pair finding

Revision en1, by rahul_1234, 2017-05-25 16:55:32

You are given a number of points on the XY-plane, [(x0,y0),(x1,y1),(x2,y2),...]. A point (xi,yi) is dominant to another point (xj,yj) iff xi>xj and yi>yj. Calculate all pairs of points such that one dominates the other.

A time complexity less then O(n*n) was required.

Tags o(nlogn), sort

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rahul_1234 2017-05-25 16:55:32 292 Initial revision (published)