## Minimize the number of replacements to get a string with same number of ‘a’, ‘b’ and ‘c’ in it

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 »

- First non-repeating character using one traversal of string | Set 2
- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- Check if two strings are permutation of each other
- 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 Occurences of Anagrams
- Count numbers in range such that digits in it and it's product with q are unequal
- Find the player who rearranges the characters to get a palindrome string first
- Counting frequencies of array elements
- Find array elements with frequencies in range [l , r]
- Find the element having different frequency than other array elements
- Find a number that divides maximum array elements
- Counting the frequencies in a list using dictionary in Python
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Count valid pairs in the array satisfying given conditions
- Frequency Measuring Techniques for Competitive Programming
- Sorting without comparison of elements
- Find alphabet in a Matrix which has maximum number of stars around it
- Replace every elements in the array by its frequency in the array
- Longest common anagram subsequence from N strings
- Longest Subsequence with at least one common digit in every element
- Frequency of each element of an array of small ranged values
- Find the count of palindromic sub-string of a string in its sorted form
- Lexicographically largest string formed from the characters in range L and R
- Sum of elements in an array with frequencies greater than or equal to that element
- Count Triplets such that one of the numbers can be written as sum of the other two
- Count pairs from two arrays having sum equal to K
- Find maximum number of elements such that their absolute difference is less than or equal to 1
- Sum of elements in an array having prime frequency
- Number of sub-arrays that have at least one duplicate

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 »

Given an array arr[], the task is to find the count of pairs from the array such that LCM(arr[i], arr[j]) > min(arr[i], arr[j]) Note: Pairs… Read More »

Given an array of integers arr[], the task is to count the number of valid pairs of elements from arr. A pair (arr[x], arr[y]) is… Read More »

Given an array arr[] of N integers. The task is to find the sum of the elements which have frequencies greater than or equal to… Read More »

Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More »

Given a matrix mat consisting of * and lowercase English alphabets, the task is to find the character which has the maximum number of *… Read More »

Given an array where elements in small range. The maximum element in the array does not go beyond size of array. Find frequencies of elements.… Read More »

This is one of the most essential operation that programmer quite often comes in terms with. Be it development or competitive programming, this utility is… Read More »

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »

Given an array A[] of N integers. The task is to find the number of triples (i, j, k) , where i, j, k are… Read More »

Given N line segments where the length of the ith line segment is . The task is to find the maximum number of parallelograms can… Read More »

Given a string of lowercase English alphabets. The task is to check if the count of distinct characters in the string is prime or not.… Read More »

Given a string , the task is to check if the frequencies of all the characters of the string are prime or not. If all… Read More »

Given an even length string S consisting of lower-case English alphabets only, we have two players playing the game. The rules are as follows: the… Read More »