Number of 1 Bits at Qualcomm

Easy76.3% acceptance

This problem has 50.0% frequency at Qualcomm.

Problem Description

Given a positive integer `n`, write a function that returns the number of set bits in its binary representation (also known as the [Hamming weight](<http://en.wikipedia.org/wiki/Hamming_weight>)).

Read full problem and hints

Topics

Also asked at 9 companies


More Qualcomm Questions

View all Qualcomm questions