kkk...not sure assume no number is greater than 1000(I mentioned There has to be some additional constraints to make the problem solvable).... Now check 1st element if not the desired element keep multiplying with 2 the previous range till either one of these condition is satisfied *1.An exception is caught* *2.Number greater than 1000 occurs.* suppose this happens for *1024 *for the given example. then we will check out for (512+1024)/2 th element for the above condition. If true than again branch like binary search.This way can element which on left side doesn't gives any exception and maintains the constraints while on the right it violates the same.So we may land up with the desired index and can then perform binary search.......
PS:There are lots of assumption in this approach and the more I write the more I get convinced that its a plain stupid idea... -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" 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/algogeeks?hl=en.
