# Tag Archives: frequency-counting

Given an arrays arr[] of size N and an array of queries Q[] of size M, where Q[i] defines the count of unique elements that… Read More
Given a string S consisting of N characters and a positive integer K, the task is to find the minimum number of operations required to… Read More
Given an array arr[] consisting of N integers and a positive integer M, the task is to find the maximum frequency for each M-length subarray… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum number of pairs of array elements such that each pair… Read More
Given a 2D array arr[][] consisting of N*N positive integers, the task is to generate an N-length array such that Greatest Common Divisors(GCD) of all… Read More
Given an array, arr[] of size N where arr[i] represents the number of tickets, the ith seller has and a positive integer K. The price… Read More
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
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 an array arr[] of N integers, and an array Q[] of M pairs, where a pair represents a query of the form {L, R},… 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