Given a HexaDecimal Number N, the task is to convert the number to its equivalent Binary Coded Decimal.Examples: Input: 11F Output: 0001 0001 1111 Explanation: Binary of 1… Read More

# Category Archives: Bit Magic

Given a Binary Number, the task is to convert this Binary number to its equivalent Hexa-Decimal Number.Examples: Input: 100000101111 Output: 82F Explanation: Dividing the number into chunks of… Read More

Given a BCD (Binary Coded Decimal), the task is to convert this to its equivalent Binary number. Examples: Input: 1001000 Output: 110000 Explanation: Integer value of the given BCD… Read More

Given an integer N, the task is to count every number i from 1 to N (both inclusive) such that i is a binary representation… Read More

Given a Doubly linked list and Circular singly linked list containing N nodes, the task is to remove all the nodes from each list which… Read More

Given string S consisting of only lowercase English letters. The task is to find if there exists any string which has left shift and right… Read More

Given an array arr containing N integers, the task is to count the possible number of pairs of elements with the same number of set… Read More

Given a BCD (Binary Coded Decimal) number, the task is to convert the BCD number into its equivalent Decimal number. Examples: Input: BCD = 100000101000 Output:… Read More

Given a decimal number N, the task is to convert N to it’s Binary Coded Decimal(BCD) form.Examples: Input: N = 12 Output: 0001 0000 Explanation: Considering 4-bit concept: 1… Read More

Given binary string str, the task is to find the minimum number of flips required to keep all 1s together in the given binary string,… Read More

Given Q queries where each query consists of two numbers L and R which denotes a range [L, R]. The task is to find the… Read More

Given a number X, calculate number of possible pairs (a, b) such that bitwise or of a and b is equal to X and number… Read More

Given a Binary Tree, the task is to find the maximum of all the XOR value of all the nodes in the path from the… Read More

Given an array arr[] of N integers, the task is to perform the following two queries: query(L, R): Print the number of Even Parity numbers… Read More

Given an array arr[] of N integers, the task is to find a pair with even parity and maximum sum. Examples: Input: arr[] = {18,… Read More