Hi Anil,
The code is the tested one. We are converting binary to num, not num to binary so i/10 is right.

I have spared my time and after testing i have given the  code

cheers,
Ashish

On 6/21/06, anil kumar <[EMAIL PROTECTED]> wrote:

hi asish,
             thanks for ur reply..
             But ur code takes O(n logn) to find the missing integer.

            The binaryToNum() will returns num in O(log n ) complexity.

            And there is a small mistake in ur code is " it is not i =
i/10, it should be i = i/2 "





--
                  ///\\
                (@ @)
     +----oOO----(_)-----------------------+
     |            ~~~                          |
     | Phone: +91(40)5511 1552      |
     |            ~~~                          |
     | Disclaimer:                           |
     | The Statement and options    |
     | expressed here are my own   |
     | do not necessarily represent  |
     | those of Oracle Corp.            |
     +-----------------oOO-------------------+
               |__|__|
                || ||
               ooO Ooo
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to