Coding Interview Questions

Hamming Distance

You are given 2 integers, and you need to return the count at which the bits are different in their binary form. Consider 8 and 1 As…

Missing Number

Problem statement: You are given an array of numbers from 1 to n, in any order, one number will be missing. You need to find a missing number.…

Power of 2

Given a number, you need to check if the number is a power of 2, return true or false accordingly. Example: Input: 1 Output: True Because 2^0…

Reverse Bits

Problem Statement: You are given a number as input. You need to reverse the bits in it’s binary form and print the output. The maximum length…