C++ solution


  • 0
    M

    class Solution {
    public:
    int hammingDistance(int x, int y)
    {
    bitset<32> n=x^y;
    return (n.count());
    }
    };


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.