Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query.
On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski < [email protected]> wrote: > Hey, so I've been thinking about the problem description... you mentioned > that there will ever only be one solution for the query, but that doesn't > seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 > and y2 = 11. The value of z = 6 will result in two solutions. > > The reason I am asking, is that the contraint of only one solution existing > suggest a different mapping of solutions than the one you suggested (not > sure what that different approach would be yet, but it could be something > along the lines of enumerating the intervals). > > Can you guarantee the constraint of only one solution per query? > > On May 3, 2010 3:01 AM, "romesh soni" <[email protected]> wrote: > > Hi Thomas, > > the possible value of x and y can be 202000000000 and 203204206207. > do you see that it is possible to make such thing in 5000 element > limitation. Are you talking of ArrayList? > > Your solution is good for small list, but I am afraid that it will not suit > my requirement.. > > > > > On Mon, May 3, 2010 at 1:00 PM, Thomas <[email protected]> wrote: > > > > Hi romesh: > > > > Datastor... > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
