## Check if array can be divided into two sub-arrays such that their absolute difference is K

Given an array arr[] and an integer K, the task is to find whether the array can be divided into two sub-arrays such that the… Read More »

- Count number of binary strings without consecutive 1’s : Set 2
- Minimum window size containing atleast P primes in every window of given range
- tgamma() method in C/C++ with Examples
- Count numbers less than N containing digits from the given set : Digit DP
- Count of interesting primes upto N
- Transform N to Minimum possible value
- Find minimum value of the expression by choosing K elements from given array
- fpclassify() method in C/C++ with Examples
- Check if an array can be formed by merging 2 non-empty permutations

Given an array arr[] and an integer K, the task is to find whether the array can be divided into two sub-arrays such that the… Read More »

Given an array arr[] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which… Read More »

Given two integers L and R, the task is to find the sum of all even numbers in range L and R. Examples: Input: L… Read More »

Given three integers N, A and B, the task is to find whether N can be represented as sum of A’s and B’s. Examples: Input:… Read More »

Given an array A[] of size N. The task is to find the how many pair(i, j) exists such that A[i] OR A[j] is odd.… Read More »

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

Given an array of integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is even. Examples: Input:… 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 an integer N, where . The task is to print the count of pieces of a circle with N cuts where each cut passes… Read More »

Given a binary array consisting of only zeroes and ones. The task is to find: The number of subarrays which has only 1 in it.… Read More »

CamelCase is the sequence of one or more than one words having the following properties: It is a concatenation of one or more words consisting… Read More »

Given an array of N elements and an integer M. Now, the array is modified by replacing some of the array elements with -1. The… Read More »

Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)… Read More »

Given a graph with n nodes and m edges. Find the maximum possible number of nodes which are not part of any edge (m will… Read More »

Given four integers a, b, c, d ( upto 10^6 ). The task is to Find the number of solutions for x < y, where… Read More »