Skip to content

Tag Archives: frequency-counting

Given an array A[], consisting of N elements, the task is to find the minimum number of swaps required such that array elements swapped to… Read More
Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string. Examples:  Input: str… Read More
Given an array arr[], consisting of N integers, the task is to check whether the entire array is only made up of subarrays such that… Read More
Given a Binary array arr[] consisting of N elements, the task is to find the maximum possible length of subarray of only 1’s, after deleting… Read More
Given a palindromic string S, the task is to find the count of palindromic strings possible by swapping a pair of character at a time.Examples:… Read More
Given an binary array arr[] cof size N, the task is to reduce the array to a single element by the following two operations: A… Read More
Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum… Read More
Given two integers [L, R], the task is to count the number of Primonacci Numbers in the range [L, R].  Primonacci Series: F(1) = F(2) =… Read More
Given a character C and a string S, the task is to remove the first and last occurrence of the character C from the string… Read More
Given a matrix mat[][] with N rows and M columns. The task is to find the minimum number of changes required in the matrix such… Read More
Given an array arr[] consisting of N distinct integers and an integer K, the task is to find the maximum size of a subset possible… Read More
Given a string Str of length N, consisting of lowercase alphabets, the task is to generate a number in decreasing order of the frequency of… Read More
Given a string S, containing lowercase English alphabets, and an integer K, the task is to find any index of the string which consists of… Read More
Given two string S and T, the task is to find the minimum length prefix from S which consists of all characters of string T.… Read More