Find the count of distinct numbers in a range
Given an array of size N containing numbers only from 0 to 63, and you are asked Q queries regarding it. Queries are as follows:… Read More »
Given an array of size N containing numbers only from 0 to 63, and you are asked Q queries regarding it. Queries are as follows:… Read More »
Given a number N in decimal format, the task is to convert it to the hexadecimal representation of N as a string. Negative numbers are… Read More »
Given two integers A and B, the task is to find an integer X such that (X XOR A) is minimum possible and the count… Read More »
Given a number N, the task is to set, clear and toggle the K-th bit of this number N. Setting a bit means that if… Read More »
Given two arrays A[] and B[]. The second array B[] contains all the elements of A[] except for 1 extra element. The task is to… Read More »
Given an array arr[] of N elements, the task is to find the maximum number of consecutive 1’s in the binary representation of an element… Read More »
Given an octal number N, the task is to convert the number to decimal and then find the modulo with every power of 2 i.e.… Read More »
Given an integer array arr1 and a binary array arr2 of same size, the task is to find the maximum possible sum of products of… Read More »
Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X, Y ≤ R and (X |… Read More »
Given a positive integer X the task is to find an integer Y such that: The count of set bits is Y is equal to… Read More »
Given an array arr[] of N positive integers, the task is to find an arrangement such that Bitwise AND of the first N – 1… Read More »
Given a binary string S, the task is to find the number of ways to split it into parts such that every part is divisible… Read More »
Given an array arr[], the task is to find the longest subsequence with a given AND value M. If there is no such sub-sequence then… Read More »
Given a binary string S, the task is to find the maximum number of parts that you can split it into such that every part… Read More »
Given an array arr[], the task is to find the longest subsequence with a given OR value M. If there is no such sub-sequence then… Read More »