yes chaman u r right........ Let us consider N+1 is power of 2 then u need log (n) bits to represent maximum number.
For n = 15 , u need log (16) = 4 bits are needed to represent the number..... So number of bits needed is dependent on n, so d = log(n)... Then ur algo. takes O(n logn) complexity. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
