@ above small correction.. /* By O(n^3), in this case it means O((N/K ^ K)) ..... */ Therefore, N = 9, K=3.. hence (9/3)^3 = 27
On Aug 4, 4:24 am, Lucifer <sourabhd2...@gmail.com> wrote: > @vikas > I believe that if we generalize the question saying that there are N > students and K schools, such that each school can accommodate at max > (N/K) students (which means each school needs to accommodate exactly > (N/K) students. Given this we need to find the minimum distance. > > By O(n^3), in this case it means O((N/K ^ 3)) ..... > > Am I right ? > > On 1 Aug, 11:48, vikas rai <vikasloves...@gmail.com> 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 distance from all the > > student to the school should be minimum. > > We have to solve this in less than O(n^3) . -- 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.