if u knw the no. of 1's in no . I mean can afford the complexity of finding no. of 1's of no.
den if no of 1' in say 101011 is 4 den largest is 111100 smalest is 001111 On Fri, May 13, 2011 at 8:38 AM, Ashish Goel <ashg...@gmail.com> wrote: > Given an integer, print the next smallest and next largest numbers that > have the same number of 1’s in their binary representations > > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > -- > 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 > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thanks & Regards Arpit Bhatnagar (Computer Engineering) (MNIT JAIPUR) -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.