Re: [algogeeks] find a point closest to other points
i don't know exactly, mode can be the point P. On 4/25/12, tech coder 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 Coder" > > -- > 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 > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- **Regards * * Bharat B | M.Tech II | C.S.E | IITM * * *Ph: +91 8056127652* -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] find a point closest to other points
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 Coder" -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] counting inversion pairs using BIT
It is simple. Initialize BIT[MAXN+1] to zero. 1.Iterate from Right to left 2.For each element array[i] Check how many elements are smaller than array[i]. This can be done by just a simple query(array[i]-1); 3. Update the array[i]th index in BIT by 1. // Simple code snippet. long ans=0; For(int i=sz-1;i>=0;i--){ ans+=query(array[i]-1); update(array[i],1); } You are consider the array element as indices of BIT so make sure u have mapped all the elements of the array from 1 to MAXN which can be done by sorting the input and using c++ stl maps. -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] intra network
my project is...when a user enters a shopping mall he will be able to search for any brand for shops(directions) or any particular commodity(we reply in what all shops it is available)...and the end user will be using a smartphone...so i need to establish a intra network for that...i have done all those parts...but for the end user to make it accessible i thought making a desktop as a server and the user will be able to use through the browser of his smart phone...so now i need a server...can i configure apache server itself for a wifi network On Tue, Apr 24, 2012 at 11:37 AM, Ravi Mohan wrote: > Dear Jnana. > > what is your project doing and what are your requirement?? > > On Mon, Apr 23, 2012 at 8:16 PM, jnana wrote: > >> Guys i am doing a project related to intra network...i am stuck at the >> server side...i know how to do the scripting at server side and >> develop web pages...but i am new to code for a server itself...can you >> suggest me about what type of server to be used...or can i configure >> the apache server itself as it renders the whole intra >> network...please help me with this...i am stuck. >> >> -- >> 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 >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > - > Thanks and Regards > > Ravi Mohan > > > > Technical Field Officer(Information Technology) > BAS- Advances Group,Dept of Information Technology, > Head Office,Canara Bank > 14 M G Road ,Bangalore-561 > Phone :- +91 8553707621 , > Email :- ravimoha...@gmail.com | ravimo...@canarabank.com > > * > 'Human knowledge belongs to the World'* > > -- > 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 > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: determine if a string if of form pZq
??? if you meant that the string should be of the form pZq where p=q(inverse) , where p,q can only be X or Y, then the simple way would be to see if the first and the last character are same and equal to X or Y or not!!! but i am sure there is more to this question, it cannot be that simple... -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Digest for algogeeks@googlegroups.com - 5 Messages in 3 Topics
On Tue, Apr 24, 2012 at 5:07 PM, wrote: > Today's Topic Summary > > Group: http://groups.google.com/group/algogeeks/topics > > no. of paths between two nodes [2 Updates] > intra network [1 Update] > Required O(n) Algorithm [2 Updates] > > no. of paths between two nodes > > Anshul Gupta Apr 23 09:38PM +0530 > > There could be finite number of paths between source and destination even > if there is a loop in the graph, you need to check if there is a loop which > lies on a path from source to destination > > Anshul Gupta > > > > bharat b Apr 24 12:12PM +0530 > > checking a loop in graph can be done by DFS. > >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. > > -- > > > **Regards > * > * > > Bharat B | M.Tech II | C.S.E | IITM > * > * > *Ph: +91 8056127652* > > > > intra network > > jnana Apr 23 07:46AM -0700 > > Guys i am doing a project related to intra network...i am stuck at the > server side...i know how to do the scripting at server side and > develop web pages...but i am new to code for a server itself...can you > suggest me about what type of server to be used...or can i configure > the apache server itself as it renders the whole intra > network...please help me with this...i am stuck. > > > > Required O(n) Algorithm > > Dave Apr 23 06:10AM -0700 > > @Ilya: As I said in my earlier post, > https://groups.google.com/d/msg/algogeeks/QyNBGrMHaCs/evd8iLvP2CUJ, use a > radix sort. It is O(n) in time, and has an O(n) space requirement. > > Dave > > On Sunday, April 22, 2012 6:55:03 PM UTC-5, Ilya Albrekht wrote: > > > > > Dave Apr 23 06:13AM -0700 > > @Bashrc: An additional constraint is that the data be integers. Counting > sort isn't applicable to floats, doubles, or character strings. That's why > I suggested using a radix sort. It is actually like a counting sort on > successive bit fields of the data. > > Dave > > On Sunday, April 22, 2012 8:37:26 PM UTC-5, .bashrc wrote: > > > > > You received this message because you are subscribed to the Google Group > algogeeks. > You can post via email. > To unsubscribe from this group, send an empty message. > For more options, visit this group. > > -- > 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 > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] problem in BIT
can nyone plz explain me how to count inversion pair in an array using BIT?? -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] counting inversion pairs using BIT
how to count the no. of inversion pairs in array using Binary Indexed Tree... plz help.. -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: determine if a string if of form pZq
Its palindrome On Apr 20, 7:43 am, vikas wrote: > couldn't understand the question :( > > On Apr 19, 1:32 pm, tech coder wrote: > > > > > > > > > determine whether the given string is of form pZq. > > p and q can contain only X and Y. > > like if p=XXYX then z will be XYXX > > for ex XXYXXXYXX is valid > > > the limitation is that "you can read only the next character at each > > point" . > > -- > > > Regards > > "The Coder" -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.