Skip to content

Tag Archives: frequency-counting

Given an array arr[] of length N containing array elements in the range [1, N], the task is to find the maximum number of pairs… Read More
Given an array arr[] consisting of N integers, the task is to find the largest subarray consisting of unique elements only. Examples: Input: arr[] =… Read More
Given a numeric string str, the task is to calculate the number of substrings with the sum of digits equal to their length. Examples: Input:… Read More
Given an array arr[] consisting of N integers, the task is to find the length of the Smallest subarray with a sum equal to K.… Read More
Given a string S and an integer K, the task is to find the number of substrings which consists of at least K pairwise distinct… Read More
Given a binary string S, the task is to find the minimum number of swaps required to be performed to maximize the value represented by… Read More
Given an array arr[] of N elements. The task is to count the total number of indices (i, j) such that arr[i] = arr[j] and… Read More
Given an integer N, the task is to find the number of Binary Strings of length N such that frequency of 1‘s is greater than… Read More
Given an array arr[] of length N, the task is to find the median of the differences of all pairs of the array elements. Example:… Read More
Given a Binary Tree and an integer D, the task is to check if the distance between all pairs of the same node values in… Read More
Given a string S of length N, consisting of lower case alphabets, and queries Q[][] of the form [L, R], the task is to count… Read More
Given an array arr[] of N integers. The task is to create a frequency array freq[] of the given array arr[] and find the maximum… Read More
Given an array A[] of size greater than integer K, the task is to find the total number of elements from the array which are… Read More
Given an array A[], consisting of N elements, the task is to find the minimum number of swaps required such that array elements swapped to… Read More
Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string. Examples:  Input: str… Read More

Start Your Coding Journey Now!