Write a recursive method that returns the number of 1s in the binary representationof N
Chapter 1, Problem 1.5(choose chapter or problem)
Write a recursive method that returns the number of 1s in the binary representationof N. Use the fact that this is equal to the number of 1s in the representation of N/2,plus 1, if N is odd.
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer