# Tag Archives: frequency-counting

Given an array arr[] with size N, the task is to find the minimum possible sum of distinct elements over all the prefixes of the… Read More
Given an array arr[] of size N having positive elements, the task is to find the minimum number of deletion or append operations to make… Read More
You are given a string S of two distinct characters as input, the task is to find two strings using characters of the given string,… Read More
Given an arr[] of binary digits. Consider two players X and Y are playing a game where in one move a player can remove any… Read More
Given a string S of size N and a positive integer K. The given string only consists of the first K English lowercase alphabets. The… Read More
In this article, we are given an array that may contain duplicate values. We will print all elements and their frequencies if the duplicates exist.… Read More
Given a matrix mat[][] of size N * N (1 ≤ N ≤ 1000), the task is to find the number of pairs of rows… Read More
Given an arr[] of positive integers and start[] and end[] arrays of length L, Which contains the start and end indexes of L number of… Read More
Given a binary array A[] of size N, the task is to check whether the array can be converted into a palindrome by flipping two… Read More
Given a positive integer N, count the number of possible distinct rearrangements of the digits of N (in decimal representation), such that the resultant number… Read More
Given an array A[] consisting of N integers, the task is to find the minimum number of operations required to make all array elements different… Read More
Given an array arr[] of length N, two arrays start[] and end[] of size M each where {start[i], end[i]} denotes a subarray of arr[] and… Read More
Given an array A[] of size N, and two integers K and C, the task is to check if all the elements of the array… Read More
Given an array arr[] of size N that contains -1 and all positive integers, the task is to modify the array and print the final… Read More
Given an array A[] of size N, and an integer X, the following operation can be performed on that array: Choose any element, say Y… Read More