I'm trying to code the closest pair algorithm...but when the distribution of points is too close, it is giving segmentation fault. My algorithm is right as for points sparsely placed it is giving same answer with bruteforce...th e problem is most probably when the line dividing points into two halves contain more than one point(not sure though) whose probability inc. with more and more points in picture. Here's my code
http://pastebin.com/ZbDtC9dq
the segmentation fault is in line
double d1 = closestPair(ppx , ll, lenL);
//checked with debugger
here's quickSortCloses tPair.c
http://pastebin.com/jCYd8dr8
help !!
http://pastebin.com/ZbDtC9dq
the segmentation fault is in line
double d1 = closestPair(ppx , ll, lenL);
//checked with debugger
here's quickSortCloses tPair.c
http://pastebin.com/jCYd8dr8
help !!
Comment