Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More

# Tag Archives: frequency-counting

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… Read More

Given an array arr[] of N integers where all elements of the array are from the range [0, 9] i.e. a single digit, the task… Read More

Given a string S consisting of character from ‘a’ to ‘z’. The task is to find the length of the largest substring of S which… Read More

Given an unsorted array with both positive and negative elements including 0. The task is to find the smallest positive number missing from the array… Read More

Given Q queries where each query consists of two positive integers L and R and the task is to find the absolute difference between the… Read More

Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More

Given an alphanumeric string str, the task is to sort the string in such a way that if a position is occupied by an alphabet… Read More

Given a string str, the task is to find the last non-repeating character in it. For example, if the input string is “GeeksForGeeks”, then the… Read More

Given an array of digits (values are from 0 to 9), find the minimum possible sum of two numbers formed from digits of the array.… Read More

Given an integer K and a range [L, R], the task is to count the quadruplet pairs from the given range having gcd equal to… Read More

Given an array arr[] of N integers. The task is to find the minimum number of given operations required to reduce the array to 0… Read More

Given a string str containing only lowercase characters. The task is to print the characters having an odd frequency in the order of their occurrence.Note:… Read More

Given an integer N in the form of string, the task is to find the largest even number from the given number when you are… Read More

Given a linked list, the task is to find the sum of all the odd frequency nodes from the given linked list. Examples: Input: 8… Read More