## Convert a Decimal number to its representation

Given a decimal number, convert that number to its binary representation. Example: Number: 5, binary representation: 101 Number: 8, binary … Read more

Given a decimal number, convert that number to its binary representation. Example: Number: 5, binary representation: 101 Number: 8, binary … Read more

Given an array of integers, write a program to find the number of pairs for which the XOR is an … Read more

Objective: Given two integers, write an algorithm to calculate the hamming distance between the integers. Hamming Distance: Hamming distance between … Read more

Objective: Given a number N, write a program to find a complement number of the given number. Flip all the … Read more

Objective: Given a Number, find all the set bits in that number. Example: Number: 23 Set bits: 4 (10111) Number: … Read more

Objective: Given a number n and k, Calculate n * k2 without using pow() or *operator. Example: N = 3, … Read more

Objective: Given a number, write a program to find if number is power of two. Example: N = 5 Output: … Read more

Objective– Given two numbers, swap both the numbers using XOR operators. Example: X = 4, Y = 8 Output: X … Read more

Objective: Given a number n and k, Calculate n / k2 without using pow() or / operator. Example: N = … Read more

What is Left Shift (<<) Operator: a<<b means left shift the bits of number a by b places. 3<<2 means … Read more

Objective: Given a number convert it to base 3 representation. Example: N = 35 Base 3 representation: 1022 N = … Read more

Objective: Given an array of integers which has all the repeating numbers (twice) but two numbers which are non-repeating. Write an … Read more

Objective: Given two numbers x and y. write an algorithm to find the number of bits which are to be flipped … Read more

Objective: Given an array of integers in which all the elements are appear thrice but one which appears only one. Write … Read more

Objective: Given an array of integers, all the elements are appear twice but one element which appears only once. Write … Read more