Question bank › Bit Manipulation
Dsa Bit Manipulation Medium

Bitwise Distance Calculator

Given two integers `A` and `B`, calculate the Hamming distance between them, which is the number of positions at which the corresponding bits are different. Input format: - A single line containing two integers, A and B, separated by a space. Output format: - A single integer representing the Hamming distance between A and B. Example: Input: 1 4 Output: 2

Key concepts

bitmanipulationhammingdistance

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.