i don't know exactly, mode can be the point P.
On 4/25/12, tech coder techcoderonw...@gmail.com wrote:
Given N points(in 2D) with x and y coordinates. You have to find a
point P (in N given points) such that the sum of distances from
other(N-1) points to P is minimum.
--
Regards
The
We cannot do it without computing distances of each node from all other
nodes. So to begin with, construct a matrix representation of the graph
with distances filled in for every pair of points.
Proceed to calculate the minimum spanning tree of such a weighted graph.
Kruskal's and Prim's are
I have been trying this problem which is from a past hacker cup.I am
getting wrong answer.http://www.spoj.pl/problems/NFACTOR/
My approach:
1.Count the number of prime factors of a number(trivial way)
for(int i=2;i*2=100;i++) number_of_factors[i]=1; //atleast 1 factor
that is 2
for(int
We can calculate the centroid of all d points and then calculate their
individual distances from it .The point with the minimum distance will
be the answer.
TC :O(n)
Regards,
PAYAL GUPTA
On 4/25/12, Navneet navneetn...@gmail.com wrote:
We cannot do it without computing distances of each node
How will you implement a graph data structure ?
Give an linked implementation as we do not know how many nodes will be
there and how many edges will be there.
Make a copy of this graph..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
I think if we calculate the center of the graph that will give the
solution, to do that
1. find the eccentricity of every node using all pair shortest path algo's
( Floyd warshall).
2. The node which is having min eccentricity is your P.
On Wed, Apr 25, 2012 at 6:14 PM, Navneet
Does any one have solution for Algorithms by Dasgupta
--
Anshul Gupta
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
ok...got it
On Wed, Apr 25, 2012 at 1:55 PM, Ravi Mohan ravimoha...@gmail.com wrote:
you can make apache server over wifi network . make sure the smartphone is
able to access your intra network. if u have put both devices on same
subnet.
On Tue, Apr 24, 2012 at 11:41 PM, Jnana Sagar