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

# Tag Archives: frequency-counting

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 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 them 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

Given a string S, the task is to check if the string can be split into two substrings such that the number of vowels in… Read More

Given two strings S1 and S2, the task is to check if S2 contains an anagram of S1 as its substring. Examples: Input: S1 =… Read More

Given a binary string, str of length N, the task is to find the maximum sum of the count of 0s on the left substring… Read More

Given two strings S1 and S2 of size N and M respectively, the task is to rearrange characters in string S1 such that S2 is… Read More

Given a binary string S of size N and three positive integers L, R, and K, the task is to find the minimum number of… Read More