## Minimum operations required to make all the elements distinct in an array

Given an array of N integers. If a number occurs more than once, choose any number y from the array and replace the x in… Read More »

- Maximize the value of A by replacing some of its digits with digits of B
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Minimum spanning tree cost of given Graphs
- Make all elements of an array equal with the given operation
- Find the repeating and the missing number using two equations
- Find the values of X and Y in the Given Equations
- Count pieces of circle after N cuts
- Count triplet pairs (A, B, C) of points in 2-D space that satisfy the given condition
- Reconstruct the array by replacing arr[i] with (arr[i-1]+1) % M
- Number of pairs with Bitwise OR as Odd number
- Count pairs with Bitwise-AND as even number
- Maximize the value of x + y + z such that ax + by + cz = n
- Check if N can be represented as sum of integers chosen from set {A, B}
- Check if an array of 1s and 2s can be divided into 2 parts with equal sum
- Split an array into groups of 3 such that X3 is divisible by X2 and X2 is divisible by X1
- Number of solutions for x < y, where a <= x <= b and c <= y <= d and x, y are integers
- Split N^2 numbers into N groups of equal sum
- Sum of all even numbers in range L and R
- Number of words in a camelcase sequence
- Represent a number as a sum of maximum possible number of Prime Numbers
- Maximize number of nodes which are not part of any edge in a Graph
- Count the number of common divisors of the given strings
- Absolute difference between the first X and last X Digits of N
- Check if a number can be represented as a sum of 2 triangular numbers
- Maximum sum after repeatedly dividing N by a divisor
- Partiton N into M parts such that difference between Max and Min part is smallest
- Count subarrays consisting of only 0's and only 1's in a binary array

Given an array of N integers. If a number occurs more than once, choose any number y from the array and replace the x in… Read More »

Given a decimal number m, convert it into a binary string and apply n iterations, in each iteration 0 becomes “01” and 1 becomes “10”.… Read More »

Given a circular sheet of radius R and the task is to find the total number of rectangles with integral length and width that can… Read More »

Given a string S and an integer K. The task is to form a string T such that the string T is a reordering of… Read More »

Given a sequence of N elements, only three operations can be performed on any element at most one time. The operations are: Add one to… Read More »

Given an ellipse with a semi-major axis of length a and semi-minor axis of length b. The task is to find the area of an… Read More »

std::hermite is based on the hermite polynomial function given by: After solving the Hermite’s Polynomial, the results come out to be like the following table:… Read More »

Our task is to design a Data Structure SpecialStack that supports all the stack operations like push(), pop(), isEmpty(), isFull() and an additional operation getMin()… Read More »

Given a positive integer L which represents the number of levels in a perfect binary tree. Given that the leaf nodes in this perfect binary… Read More »