mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-05 20:48:22 +08:00
Update bit_manipulation/count_of_set_bits.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -29,7 +29,7 @@ namespace bitCount {
|
||||
/**
|
||||
* @brief The main function implements set bit count
|
||||
* @param n is the number whose set bit will be counted
|
||||
* @returns count , the number set bit in binary representation of n
|
||||
* @returns the count of the number set bit in the binary representation of `n`
|
||||
*/
|
||||
std::uint64_t countSetBits(int n) {
|
||||
int count = 0; // "count" variable is used to count number of 1's in binary
|
||||
|
||||
Reference in New Issue
Block a user