Re: [algogeeks] Re: find a point closest to other points

2012-05-06 Thread abhishek kumar
Not Necessary but for some case only On Tue, May 1, 2012 at 8:44 PM, Bhupendra Dubey wrote: > Find the centroid > > X= (x1 +x2xn)/N > Y=(y1+y2..yn)/N > This will precisely be the point no need to calculate and check with > distance. > > > On Tue, May 1, 2012 at 1:18 PM, mohit mishra wrote

Re: [algogeeks] Re: Sorting in O(n)

2012-05-06 Thread saurabh singh
Yes thanx for that...Gene had already mentioned that in somewhat different way.And now I feel like a floppy disk for not being able to think the obvious. Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Sun, May 6, 2012 at 10:20 PM, Arpit Gupta wrote: > O(1

Re: [algogeeks] Re: Sorting in O(n)

2012-05-06 Thread Arpit Gupta
O(1) base conversion can here be done as follows:-(works only when numbers are in range 0 to n^2-1) *From base 10 to base n *let given base 10 no is m and we need to convert it in base n. then base n converted no is (m/n)(m%n) ie 34 base 10 in base 6 is (34/6)(34%6) ie 54 Now i think you can yours