## Print characters having odd frequencies in order of occurrence

Given a string str containing only lowercase characters. The task is to print the characters having an odd frequency in the order of their occurrence.… Read More »

## Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by… Read More »

## Count of quadruplets with given Sum | Set 2

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

## Remove all occurrences of any element for maximum array sum

Given an array of positive integers, remove all the occurrences of element to get the maximum sum of the remaining array Examples: Input : arr… Read More »

## Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring

Given a string str of lowercase English alphabets and an integer m. The task is to count how many positions are there in the string… Read More »

## Sum of elements in 1st array such that number of elements less than or equal to them in 2nd array is maximum

Given two unsorted arrays arr1[] and arr2[], the task is to find the sum of elements of arr1[] such that number of elements less than… Read More »

## Print 2-D co-ordinate points in ascending order followed by their frequencies

Given two arrays x[] and y[] where x[i] represents the x coordinate and y[i] represents the corresponding y coordinate of a 2-D point, the task… Read More »

## Split the array elements into strictly increasing and decreasing sequence

Given an array of N elements. The task is to split the elements into two arrays say a1[] and a2[] such that one contains strictly… Read More »

## Find number of unique triangles among given N triangles

Given three arrays a[], b[] and c[] of N elements representing the three sides of N triangles. The task is to find the number of… Read More »

## Minimum number of given operations required to convert a permutation into an identity permutation

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »

## Count distinct points visited on the number line

Given a person who is at position current_pos and a binary string path which is the moves the person took, if path[i] = ‘0’ then… Read More »

## Count of pairs of strings which differ in exactly one position

Given an array arr[] of strings of equal lengths. The task is to calculate the total number of pairs of strings which differ in exactly… Read More »

## Check if product of array containing prime numbers is a perfect square

Given an array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

## Number of ways in which the substring in range [L, R] can be formed using characters out of the range

Given a string S and a range [L, R]. The task is to find the number of ways in which the sub-string in the range… Read More »

## Maximum length of a sub-array with ugly numbers

Given an array arr[] of N elements (0 ≤ arr[i] ≤ 1000). The task is to find the maximum length of the sub-array that contains… Read More »