Sanjaykumar-IT/dsa-problems

Check No.of bits set to 1

Open

#20 opened on Oct 15, 2024

 (1 comment) (0 reactions) (0 assignees)Java (4 forks)auto 404
hacktoberfesthactoberfest2024

Repository metrics

Stars
 (1 star)
PR merge metrics
 (PR metrics pending)

Description

Given a number, calculate the no.of bits that are set to 1 for its binary representation

Input: 7 Output 3

Input 8 Output 1

Input 0 Output 0

Contributor guide