## Count of numbers whose 0th and Nth bits are set

Given a positive integer N, the task is to count the numbers that can be represented with N bits and whose 0th and Nth bits… Read More »

- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Sum of XOR of all subarrays
- Check if a number is perfect square without finding square root
- Nth number whose sum of digit is multiple of 10
- Count pairs in array whose sum is divisible by K
- Puzzle | Neighbors in a round table
- Minimum operations required to make all the array elements equal
- Generate all rotations of a number
- A Sum Array Puzzle
- Find K Closest Points to the Origin
- Count of pairs (x, y) in an array such that x < y
- Check if it is possible to reach a number by making jumps of two given length
- Distribute N candies among K people
- Find the number in a range having maximum product of the digits
- Count rotations of N which are Odd and Even
- Given two arrays count all pairs whose sum is an odd number
- Sum of all Submatrices of a Given Matrix
- New Algorithm to Generate Prime Numbers from 1 to Nth Number
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Number of array elements derivable from D after performing certain operations
- Minimum number of sets with numbers less than Y
- Midpoint ellipse drawing algorithm
- Sum of bitwise AND of all subarrays
- Sum of the series 1^1 + 2^2 + 3^3 + ..... + n^n using recursion
- Find elements of array using XOR of consecutive elements
- Remove characters from a numeric string such that string becomes divisible by 8
- Represent n as the sum of exactly k powers of two | Set 2
- Find the value of ln(N!) using Recursion
- Count of all possible values of X such that A % X = B

Given a positive integer N, the task is to count the numbers that can be represented with N bits and whose 0th and Nth bits… Read More »

Given a positive integer N, the task is to find a number which contains (N – 1) set bits in its binary form at every… Read More »

Given a linked list with distinct elements, the task is to find the bitonic point in the given linked list. If there is no such… Read More »

Given two integers L and R, the task is to find the XOR of elements of the range [L, R]. Examples :‘ Input: L =… Read More »

Given two integers A and B. The task is to check whether it is possible to convert A into B by performing below operations any… Read More »

Given an array of size N and an integer K. The array consists of only digits {0, 1, 2, 3, …k-1}. The task is to… Read More »

Given an array arr[] and three integers D, A and B. You start with the number D and at any time you can add or… Read More »

Given an integer N, the task is to print first N Mosaic numbers. A Mosaic number can be expressed as follows: If N = p1a1p2a2…pkak… Read More »

Given here are n squares which are inclined and touch each other externally at vertices, and are lined up in a row.The distance between the… Read More »

Given two integers N and X, where N is the number of nodes in an almost complete binary tree. The task is to find: The… Read More »

Given four integers a, b, c and N. The task is to find the Nth term which is divisible by either of a, b or… Read More »

Given an integer N and the task is to find a sequence of N prime numbers whose sum is a composite number. Examples: Input: N… Read More »

Given a number N, the task is to find the number of ways of writing N as a sum of 4 squares. Two representations are… Read More »

Given an integer N, the task is to find the Nth Mosaic number. A Mosaic number can be expressed as follows: If N = Aa… Read More »

Given an integer N, the task is to print the first N terms of the Lower Wythoff sequence. Examples: Input: N = 5 Output: 1,… Read More »