# Tag Archives: frequency-counting

Given a string S consisting of N lowercase English alphabets, and an integer K and, an array cost[] of size 26 denoting the cost ofâ€¦ Read More
Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the number of pairs (i, j)â€¦ Read More
Given an array, arr[] consisting of N strings where each character of the string is lower case English alphabet, the task is to store andâ€¦ Read More
Given a string S of length N, where each character of the string is either equal to ‘L’, ‘R’ or ‘?’, the task is toâ€¦ Read More
Given a string S consisting of N digits from [1, 9] and a positive integer K and X. Every day each character of the stringâ€¦ Read More
Given an array arr[] of N integers, the task is to find the maximum prefix length of the array such that removing exactly one elementâ€¦ Read More
Given an array arr[] of size N and an integer K, the task is to check whether it’s possible to split the array into strictlyâ€¦ Read More
Given an array arr[] consisting of N integers, the task is to split the array into the minimum number of disjoint groups, such that differencesâ€¦ Read More
Given two strings S1 and S2 consisting of N and M characters, the task is to check if the string S1 can be made equalâ€¦ Read More
Given an array arr[] consisting of N integers, the task is to partition the array into two subsets such that the count of unique elementsâ€¦ Read More
Given a sorted array arr[] of size N, the task is to print all the unique elements in the array. An array element is saidâ€¦ Read More
Given an array arr[] of size N, (where 0<A[i]<=N, for all 0<=i<N), the task is to calculate for each number X from 1 to N,â€¦ Read More
Given a string S consisting of N lowercase English characters, the task is to print the lexicographically, the largest string obtained using only the minimumâ€¦ Read More
Given a string, S of even length N, the task is to find the minimum number of moves needed to convert the string to aâ€¦ Read More
Given a positive integer K and a string S consisting of N characters, the task is to maximize the sum of the frequencies of exactlyâ€¦ Read More