Qualcomm Interview Question

Write a function that determines how many 1s are in an integer.