## Partiton N into M parts such that difference between Max and Min part is smallest

Given two integers N and M, partiton N into M integers such that the difference between the maximum and minimum integer obtained by the partition… Read More »

- Make all numbers of an array equal
- Sum of XOR of all subarrays
- Nth number whose sum of digit is multiple of 10
- Count common characters in two strings
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Sort an array without changing position of negative numbers
- Given two arrays count all pairs whose sum is an odd number
- Operations required to make the string empty
- Java ArrayList to print all possible words from phone digits
- Find minimum difference between any two elements | Set 2
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Program to find the kth character after decrypting a string
- Find two numbers whose divisors are given in a random order
- Sum of bitwise AND of all subarrays
- Total number of possible Binary Search Trees using Catalan Number
- Count of all possible values of X such that A % X = B
- Find sub-arrays from given two arrays such that they have equal sum
- Maximize the happiness of the groups on the Trip
- Find the minimum number of operations required to make all array elements equal
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Check if a Queen can attack a given cell on chessboard
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Maximum subarray sum by flipping signs of at most K array elements
- Find the minimum number of elements that should be removed to make an array good
- Find the minimum number of preprocess moves required to make two strings equal
- Count how many times the given digital clock shows identical digits
- Shortest path on a Square
- Replace array elements by sum of next two consecutive elements
- Number of ways of scoring R runs in B balls with at most W wickets

Given two integers N and M, partiton N into M integers such that the difference between the maximum and minimum integer obtained by the partition… Read More »

Given four integers sourceX, sourceY, destinationX and destinationY which represent the source and destination coordinates on a chessboard. The task is to find the minimum… Read More »

Given an array of distinct elements, the task is to find the total number of two element pairs from the array whose sum is a… Read More »

Given an even number N. The task is to consider numbers from 1 to N2, split them into N groups of the equal sum. Examples:… Read More »

Given a string str containing only lowercase English alphabets, the task is to find the sum and product of all the prime frequencies of the… Read More »

Given two integers and and an array arr[] every element of which at index is calculated as arr[i] = i * (-1)i. The task is… Read More »

Given an N-ary tree, print the number of leaf nodes in the subtree of every node. Examples: Input: 1 / \ 2 3 / |… Read More »

Given an array of integers. The task is to sort the given array on the basis increasing count of distinct prime factors. Examples: Input :… Read More »

Given integers i, j, k and n where (i, j) is the initial position of the Knight on a n * n chessboard, the task… Read More »

Given two binary numbers strings and of length . Find the number of ways of swapping two bits in s1(only s1 not s2) so that… Read More »

Given that the three players playing a game of rolling a dice. Player1 rolled a dice got A and player2 rolled a dice got B.… Read More »

Given a very large number in the form of a string, the task is to check if the number is divisible by 75 or not.… Read More »

Given an array of N numbers, the task is to print all the numbers greater than 1 which divide the maximum of array elements. Examples:… Read More »

Given two number A and B, the task is to find the sum of common factors of two numbers A and B. The numbers A… Read More »

Given an integer N, the task is to find N elements which fail the below-sorting algorithm. If none of the N elements fail, then print… Read More »