Angad Sandhu
Search
Browse

191_Number_of_1_Bits

Source name
191_Number_of_1_Bits.py
# File: Leetcode/Solutions/191_Number_of_1_Bits.py

"""
Problem Number: 191
Problem Name: Number of 1 Bits
Difficulty: Easy
Tags: Bit Manipulation, Neetcode 150
Company (Frequency): Amazon, Google, Facebook, Microsoft, Apple
Leetcode Link: <https://leetcode.com/problems/number-of-1-bits/description/>

DESCRIPTION

Count number of '1' bits in a 32-bit integer.
Approaches:

* Kernighan's bit trick (n &= n - 1 loop), or built-in bit count.
"""

Browse the library