mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-11 22:46:39 +08:00
Update bit_manipulation/hamming_distance.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ccc3417c66
commit
4899b34464
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Returns the Hamming distance between two integers
|
||||
* @brief Returns the [Hamming distance](https://en.wikipedia.org/wiki/Hamming_distance) between two integers
|
||||
*
|
||||
* @details
|
||||
* To find hamming distance between two integers, we take their xor, which will
|
||||
@@ -37,4 +37,4 @@ int main() {
|
||||
|
||||
std::cout << "Hamming distance between " << a << " and " << b << " is "
|
||||
<< hamming_distance(a, b) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user