## Number of subarrays having sum of the form k^m, m >= 0

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

- Program to find the Hidden Number
- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Largest palindromic number in an array
- Check if a number is perfect square without finding square root
- Find the unit place digit of sum of N factorials
- Check if a number can be expressed as a^b | Set 2
- Puzzle | Cut Blue Painted Cube
- Sum of the first N Prime numbers
- Minimum operations required to make all the array elements equal
- Sum of minimum elements of all subarrays
- Sum of XOR of all subarrays
- A Sum Array Puzzle
- Generate all rotations of a number
- Check if it is possible to reach a number by making jumps of two given length
- Puzzle | Neighbors in a round table
- Number of array elements derivable from D after performing certain operations
- Program to find minimum number of lectures to attend to maintain 75%
- Find K Closest Points to the Origin
- Minimum number of sets with numbers less than Y
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Check if a number is a Mystery Number
- Sum of the multiples of two numbers below N
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Count of pairs (x, y) in an array such that x < y
- Immediate smallest number after re-arranging the digits of a given number
- Find the Nth term of the series 14, 28, 20, 40,.....
- Find elements of array using XOR of consecutive elements
- Remove characters from a numeric string such that string becomes divisible by 8
- Graph Types and Applications

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

Given an array, arr[] and a function F(i, j). The task is to compute max{F(i, j)} over all sub-arrays [i..j]. The fucntion F() is defined… Read More »

Given the 2 end points (x1, y1) and (x2, y2) of a line. The task is to determine the numer of squares that line will… Read More »

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

Given an array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

Given an integer N, the task is to print a good permutation of first N natural numbers. Let’s denote the ith element of the permutation… Read More »

Given an integer N(1<=N<=10^9). The task is to represent N as a sum of the maximum possible number of composite summands and print this maximum… Read More »

Given two integers n and m and a and b, in a single operation n can be multiplied by either a or b. The task… Read More »

Given two integers n and m, in a single operation n can be multiplied by either 2 or 3. The task is to convert n… Read More »

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… Read More »

Given an integer N, the task is to print all the semi-prime numbers ≤ N. A semi-prime number is an integer which can be expressed… Read More »

Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset. Examples: Input : N… Read More »

Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ….. + fib(r)… Read More »

Given the volume V of a tank in liter. There is a pump which is filling the tank at speed of M liter per minute.… Read More »

Given here is a right circular cone of radius r and perpendicular height h, which is inscribed in a cube which in turn is inscribed… Read More »