Skip to content

Tag Archives: frequency-counting

Given string str representing a sentence, and an integer K, the task is to capitalize all the words in the given sentence having at least… Read More
Given two strings A and B each of length N and an integer K, the task is to find if string A can be converted… Read More
Given an array arr[]. The task is to count elements in the array that appears only once and it’s consecutive next (arr[i]+1) and prev (arr[I]… Read More
Given string str, the task is to find the frequency of all digits (0-9) in a string created by concatenating the ASCII values of each… Read More
Given a string str of length N. The task is to print the frequency of adjacent repeating characters.  Examples: Input: str = “Hello”Output: l: 2Explanation:… Read More
Given a ternary string S consisting of only three characters, the task is to find the count of ordered triplets (i, j, k) such that… Read More
Given a number N, the task is to find the distinct Prime Factors of N. Examples: Input: N = 12Output: 2 3Explanation: The factors of… Read More
Given a string str of size N consisting of lowercase English characters, the task is to find the minimum characters to be replaced to make… Read More
Given an integer array arr[] of size N and a positive integer K, the task is to count all the pairs in the array with… Read More
Given an array of strings arr[], the task is to find the smallest string which contains all the characters of the given array of strings.… Read More
Given an array arr[], the task is to find the number of times the current integer has already occurred during array traversal.  Examples: Input: arr[]… Read More
Given N lowercase sentences, the task is to find the minimum count of words among all of these sentences.  Examples:  Input: arr[] = { “there is… Read More
Given an array of strings arr[]. The task is to generate the string which contains all the characters of all the strings present in array… Read More
Given a string, str consisting of lowercase English alphabets, the task is to find the number of unique characters present in the string. Examples: Input:… Read More
Given an array arr[] of size N, The task is to find the length of the smallest subarray consisting of all the occurrences of maximum… Read More

Start Your Coding Journey Now!