in general, preprocessing is preferred over run time calculation hence i would have he number of bits on a platform known/calculated upfront and then use the log n algo
Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 On Mon, Jul 5, 2010 at 9:16 AM, Rahul Kushwaha <rahul.kushw...@gmail.com>wrote: > @ashish : you are correct but the number of bits in the integer datatype is > fixed while using anding algo.. > but the looping algorithm is valid for any number of bit in the integer.. > > -- > 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<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- 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.