## Maximum count of pairs which generate the same sum

Given an array arr[], the task is to count maximum count of pairs which give the same sum. Examples: Input: arr[] = {1, 2, 3,… Read More »

- Sum of all odd frequency elements in an array
- For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
- Count numbers in range such that digits in it and it's product with q are unequal
- Find two numbers whose divisors are given in a random order
- Count occurrences of a string that can be constructed from another given string
- Find alphabet in a Matrix which has maximum number of stars around it
- Find array elements with frequencies in range [l , r]
- Find the player who rearranges the characters to get a palindrome string first
- Find the element having different frequency than other array elements
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Find a number that divides maximum array elements
- Replace every elements in the array by its frequency in the array
- Longest Subsequence with at least one common digit in every element
- Count valid pairs in the array satisfying given conditions
- Count Triplets such that one of the numbers can be written as sum of the other two
- Sum of elements in an array with frequencies greater than or equal to that element
- Make palindromic string non-palindromic by rearranging its letters
- Find the count of palindromic sub-string of a string in its sorted form
- Number of sub-arrays that have at least one duplicate
- Count pairs from two arrays having sum equal to K
- Frequency of each element of an array of small ranged values
- Lexicographically largest string formed from the characters in range L and R
- Count all elements in the array which appears at least K times after their first occurrence
- Sum of elements in an array having prime frequency
- Replace each element by the difference of the total size of the array and frequency of that element
- Find maximum number of elements such that their absolute difference is less than or equal to 1
- Remove elements from the array whose frequency lies in the range [l, r]
- Count pairs in an array such that LCM(arr[i], arr[j]) > min(arr[i],arr[j])
- Construct a frequency array of digits of the values obtained from x^1, x^2, ........, x^n
- Count elements present in first array but not in second

Given an array arr[], the task is to count maximum count of pairs which give the same sum. Examples: Input: arr[] = {1, 2, 3,… Read More »

Given a string str consisting of lowercase English alphabets. The task is to find whether there is any character in the string whose frequency is… Read More »

Given an array arr[] of N integers. The task is to find the number of index quadruples (i, j, k, l) such that a[i], a[j]… Read More »

Given a string of lowercase alphabets. The task is to check whether the frequency of alphabets in this string, after arranging in any possible manner,… Read More »

Given an array arr[] of N integer elements and an integer K. The task is to count all distinct arr[i] such that arr[i] appears at… Read More »

Given a string consisting of lower case English Alphabets. The task is to count the number of occurrences of the non-empty prefix which occurs the… Read More »

Given an array arr[] and an integer k, the task is to find the maximum product from the array such that the frequency sum of… Read More »

Given an array arr[] of N integers and an integer M where N % M = 0. The task is to find the minimum number… Read More »

Given an array of N elements and Q queries, where each query contains an integer K. For each query, the task is to find the… Read More »

Given N strings consisting of lowercase letters of the English alphabet. The task is to find how many strings out of these N strings are… Read More »

Given a string str containing lowercase alphabets (a – z). The task is to print the string after rearranging some characters such that the string… Read More »

Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »

Given an array of N numbers which has all divisors of two numbers in any order. The task is to find the two numbers whose… Read More »

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

Given a string str, the task is to count the maximum number of possible operations that can be performed on str. An operation consists of… Read More »