@Amod. Isn't the minimum sum the sum of the minimum cost from A to B and the minimum cost from B to A? What am I missing?
Dave On Oct 13, 11:06 pm, Amod <gam...@gmail.com> wrote: > Hi > > I think I forgot to mention that the SUM of the ROUND trip i.e. A->B->A (sum > = going + returning) should be least. > > Please don't take into account any other thing like time and > availability. > So solution is not that straightforward. > > Its like we have two arrays and we have to return least k sum from the > given arrays where we take one element from the first and one from > second in the sum. > > Cheers > Amod > > On Oct 13, 2:26 pm, Shiyam code_for_life <mailshyamh...@gmail.com> > wrote: > > > > > When a user wants to choose to fly from A to B, suggest the flight > > with lowest fare that's available, here its A1, if A1 is busy then A2 > > and so on > > Repeat the same for B to A. > > > Am I missing something here? > > > Complexity is O( (number of flights from A to B) + number of flights > > from B to A) ) > > > Cheers > > > 'Coding is an art'- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.