[algogeeks] Re: [Google question]

2012-08-01 Thread Don
What is N? This is a fixed-size problem so by definition, every solution will be constant time. Don On Aug 1, 2:48 am, vikas rai wrote: > There is a set of 9 students and 3 schools Every school can be alloted > atmax 3 students .Every school and student has its coordinates .Now we have > to allot

Re: [algogeeks] Dominating Points

2012-08-01 Thread Sambhavna Singh
yes :( -- 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

Re: [algogeeks] Dominating Points

2012-08-01 Thread atul anand
i can think of O(n^2) approach .. i guess you are expecting with less time complexity On Wed, Aug 1, 2012 at 9:49 AM, Sambhavna Singh wrote: > If we are given a number of points on the XY-plane, > [(x0,y0),(x1,y1),(x2,y2),...]. > > A point (xi,yi) is dominant to another point (xj,yj) iff xi>xj an

Re: [algogeeks] [Google question]

2012-08-01 Thread atul anand
seems like Hungarian algorithm will work . On Wed, Aug 1, 2012 at 12:18 PM, vikas rai wrote: > There is a set of 9 students and 3 schools Every school can be alloted > atmax 3 students .Every school and student has its coordinates .Now we have > to allot student in such a way that the sum of dis

Re: [algogeeks] Removing space inplace

2012-08-01 Thread atul anand
j=0; for i to len if(str[i] != ' ' ) { str[j]=str[i]; j++; } end str[j]='\0'; On Wed, Aug 1, 2012 at 10:08 AM, Sambhavna Singh wrote: > Please have a look at this : > http://www.careercup.com/question?id=14433699&utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+Ca

Re: [algogeeks] Removing space inplace

2012-08-01 Thread Sambhavna Singh
Ok thank you its much clear now :) On Wed, Aug 1, 2012 at 1:40 PM, Daksh Talwar wrote: > By not allowing shifting , I guess they mean that you cannot shorten the > overall length of the string . > Eg . "ab c" > the output should not be obtained by shifting c to the 3rd postion in the > array. >

Re: [algogeeks] Microsoft online questions

2012-08-01 Thread Navin Kumar
@Daksh: you are right :) On Tue, Jul 31, 2012 at 11:30 PM, Daksh Talwar wrote: > @Navin : Thanks a lot . > Also , I had this doubt , that taking the middle of the array as the root > is just a convention right ? > The tree we get is just one of the n(catalan number) trees we can get > using the

Re: [algogeeks] Removing space inplace

2012-08-01 Thread Daksh Talwar
By not allowing shifting , I guess they mean that you cannot shorten the overall length of the string . Eg . "ab c" the output should not be obtained by shifting c to the 3rd postion in the array. On Wed, Aug 1, 2012 at 10:08 AM, Sambhavna Singh wrote: > Please have a look at this : > http://www

Re: [algogeeks] Removing space inplace

2012-08-01 Thread dheeraj chawla
@sambhavna ...according to me u r violating the condition...bcoz using pointer u r trying to do shifting(moving) character values with spaces.so acc. to question is not correct.. On Wed, Aug 1, 2012 at 10:08 AM, Sambhavna Singh wrote: > Please have a look at this : > http://www.career

[algogeeks] [Google question]

2012-08-01 Thread vikas rai
There is a set of 9 students and 3 schools Every school can be alloted atmax 3 students .Every school and student has its coordinates .Now we have to allot student in such a way that the sum of distance from all the student to the school should be minimum. We have to solve this in less than O(n^3)

Re: [algogeeks] Microsoft online questions

2012-08-01 Thread Daksh Talwar
@Navin : Thanks a lot . Also , I had this doubt , that taking the middle of the array as the root is just a convention right ? The tree we get is just one of the n(catalan number) trees we can get using the DLL/array given ..? On Tue, Jul 31, 2012 at 10:57 PM, manish untwal wrote: > hey friends,

Re: [algogeeks] Re: coin problem

2012-08-01 Thread Hariraman R
@vipin kumar, The no 7 and x are just assumptions it may be of any combinations... just try it in real time then you will have a clear understanding. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group,