## Given two arrays count all pairs whose sum is an odd number

Given two arrays of N and M integers. The task is to find the number of unordered pairs formed of elements from both arrays in… Read More »

- Length of the longest alternating subarray
- Number of array elements derivable from D after performing certain operations
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Program to find the kth character after decrypting a string
- Maximize the value of A by replacing some of its digits with digits of B
- Minimum number of moves to make all elements equal
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Print array elements in alternatively increasing and decreasing order
- Maximum possible time that can be formed from four digits
- Print the balanced bracket expression using given brackets
- Find Sum of pair from two arrays with maximum sum
- Find minimum operations needed to make an Array beautiful
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Distribute candies in a Binary Tree
- Minimum number of operations required to reduce N to 1
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Generate permutation of 1 to N such that absolute difference of consecutive numbers give K distinct integers
- Split the array elements into strictly increasing and decreasing sequence
- Maximum number of candies that can be bought
- Delete odd and even numbers at alternate step such that sum of remaining elements is minimized
- Minimum operations to make frequency of all characters equal K
- Longest Subsequence with at least one common digit in every element
- Minimum number of elements to be removed so that pairwise consecutive elements are same
- Length of longest consecutive ones by at most one swap in a Binary String
- Count of pairs of strings which differ in exactly one position
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated
- Number of submatrices with all 1s
- Divide a number into two parts
- Find original numbers from gcd() every pair

Given two arrays of N and M integers. The task is to find the number of unordered pairs formed of elements from both arrays in… Read More »

Given a string S, the task is to check if we can make the string lexicographically smaller by reversing any sub-string of the given string.… Read More »

Given two array A[] and B[]. Where size of A[] represent the number of rows and A[i] represent the number of boxes in the ith… Read More »

There are two cash lockers, one has X number of coins and the other has Y number of coins, you can withdraw money at max… Read More »

Given N intervals in the form [l, r] and an integer Q. The task is to find the interval which when removed results in the… Read More »

Given a circular ring which has marking from 1 to N. Given two numbers A and B, you can stand at any place(say X) and… Read More »

Given an integer N, the task is to find the value of F(N) if: F(1) = 0 F(2) = 2 F(N) = 0, if N… Read More »

Given an array of N elements and you can perform two operations on it: Increase any of the array element by X once. Decrease any… Read More »

Given a binary array of N elements and two initial values a and b. We can cross the i-th element if: If a[i] == 0,… Read More »

Given a 2-D array of order N X M array elements, the task is to check if we can select a number from every row… Read More »

Given a total amount of N and unlimited number of coins worth 1, 10 and 25 currency coins. Find out the minimum number of coins you need to use… Read More »

Given an array arr[] of random integers, the task is to push all the zero’s in the array to the start and all the one’s… Read More »

Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of… Read More »

Given a merged sequence which consists of two sequences which got merged, one of them was strictly increasing and the other was strictly decreasing. Elements… Read More »

Given an array arr[] of N elements. At any step, we can delete a number of a different parity from the just previous step, i.e.,… Read More »