## Minimize the cost to split a number

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… 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
- Find K Closest Points to the Origin
- Generate all rotations of a number
- A Sum Array Puzzle
- Check if it is possible to reach a number by making jumps of two given length
- Count of pairs (x, y) in an array such that x < y
- 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
- 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
- Count of all possible values of X such that A % X = B
- Find the value of ln(N!) using Recursion
- Find sub-arrays from given two arrays such that they have equal sum

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 »

Given the Selling price i.e ‘SP’ of the two items each. One item is sold at ‘P%’ Profit and other at ‘P%’ Loss. The task… Read More »

Given three non-zero integers a, b and c. The task is to find the maximum value possible by putting addition and multiplication signs between them… Read More »

Given an array arr[] of N elements and an integer K where K < N. The task is to insert K integer elements to the… Read More »

Given an integer N. The following tasks are performed: The number is noted. The leading digit from N is subtracted from N and the resulting… Read More »

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that: floor(arr[i]… Read More »

Given an array arr[] and an integer K. The task is to sort the elements that are in between any two multiples of K. Examples:… Read More »

Given three integers X, N and M. The task is to find XXX…(N times) % M where X can be any digitfrom the range [1,… Read More »

Given an integer Y, find the smallest number X such that X! contains at least Y trailing zeros. Prerequisites – Count trailing zeroes in factorial… Read More »