0

I'm trying to find out if there's away for evaluating the number of on bits in a binary number of length n using O(1) space, in logn steps? If so- How?

Joni
  • 215
  • 2
  • 5

1 Answers1

0

A lookup table will find this in constant time.

Mike Kwan
  • 24,123
  • 12
  • 63
  • 96