Skip to content

Tag Archives: frequency-counting

Given a string S consisting of lowercase English alphabets, the task is to find the length of the longest subsequence from the given string such… Read More
Given a string S consisting of lowercase English alphabets, the task is to find the minimum number of characters required to be removed such that… Read More
Given an array arr[] of N integers, the task for each array element is to find the number of ways of choosing a pair of… Read More
Given an array arr[] of size N, the task is to find the minimum number of array elements required to be removed such that the… Read More
Given an array arr[] consisting of 2*N integers, the task is to check if it is possible to rearrange the array elements such that arr[2… Read More
Given two strings S1 and S2 of lengths M and N respectively, the task is to calculate the sum of the frequencies of the characters… Read More
Given two arrays switch[], consisting of binary integers denoting whether a switch is ON(0) or OFF(1), and query[], where query[i] denotes the switch to be… Read More
Given an array arr[] of size N, and an integer K representing a digit, the task is to print the given array in increasing order… Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum count of divisions(integer division) of array elements by 2… Read More
Given a string S of length N consisting of 1, 0, and X, the task is to print the character (‘1’ or ‘0’) with the… Read More
Given a string S of length N and two integers M and K, the task is to count the number of substrings of length M… Read More
Given an array arr[] and an array query[] consisting of Q queries, the task for every ith query is to count the number of subarrays… Read More
Given a string S consisting of lowercase alphabets and an integer K, the task is to print all the words that occur K times in… Read More
Given an array arr[] consisting of N positive integers, the task is to modify every array element by reversing their binary representation and count the… Read More
Given an array arr[] consisting of N integers, the task is to count the number of valid pairs (i, j) such that arr[i] + arr[j]… Read More