Page 1 of 1
Posted: Fri Nov 12, 2004 8:50 pm
Could anybody tell me how to write an efficent algo for sorting points if we are given their coordinates?
Posted: Sun Nov 14, 2004 3:27 pm
Yes, define a relation between the points and just use quicksort or a garantueed N log N algorithm for sorting.
Posted: Mon Apr 10, 2006 12:29 pm
define each point as a pair, because pair has < operator, and sorting it by sort function.