leetle

Daily challenge for 2025-03-07

66. Hamming Distance

Write a function solve that computes the Hamming distance between two integers (number of differing bits).

Example:
Input: 1,4
Output: 2
Explanation: 1 (0b001) and 4 (0b100) have 2 differing bits.

Run this challenge interactively in Python or JavaScript when the app loads.