Given an array arr[] consisting of N integers, the task is to check if the sum of K most frequent array elements and the sum… Read More

# Tag Archives: frequency-counting

Given a string str containing characters ‘G’ and ‘F’ only, the task is to check if the given string str can be made empty after… Read More

Given two strings str1 of size N and str2 of size M.The task is to find if it is possible to compose str2 by using… Read More

Given encoded string str such that ‘a’ is written 1 time, ‘b’ is written 2 times, and so on, until ‘z’ is written 26 times,… Read More

Given a string S of size N representing a monoalphabetic cipher, the task is to print the top five possible plain texts that can be… Read More

Given two binary arrays, A[] and B[] of size N respectively, the task is to find the number of elements in array A[] that will… Read More

Given a sorted array, arr[] consisting of N integers, the task is to find the frequencies of each array element. Examples: Input: arr[] = {1,… Read More

Given an array, arr[] of N strings and a string T of size M, the task is to check if it is possible to make… Read More

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