## Minimum operations to make counts of remainders same in an array

Given an array arr[] of N integers and an integer M where N % M = 0. The task is to find the minimum number… Read More »

## Queries for number of distinct integers in Suffix

Given an array of N elements and Q queries, where each query contains an integer K. For each query, the task is to find the… Read More »

## Acronym words

Given N strings consisting of lowercase letters of the English alphabet. The task is to find how many strings out of these N strings are… Read More »

## Make palindromic string non-palindromic by rearranging its letters

Given a string str containing lowercase alphabets (a – z). The task is to print the string after rearranging some characters such that the string… Read More »

## Count occurrences of a string that can be constructed from another given string

Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »

## Find two numbers whose divisors are given in a random order

Given an array of N numbers which has all divisors of two numbers in any order. The task is to find the two numbers whose… Read More »

## Minimize the number of replacements to get a string with same number of ‘a’, ‘b’ and ‘c’ in it

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

## Maximum number of removals of given subsequence from a string

Given a string str, the task is to count the maximum number of possible operations that can be performed on str. An operation consists of… Read More »

## Count pairs in an array such that LCM(arr[i], arr[j]) > min(arr[i],arr[j])

Given an array arr[], the task is to find the count of pairs from the array such that LCM(arr[i], arr[j]) > min(arr[i], arr[j]) Note: Pairs… Read More »

## Count valid pairs in the array satisfying given conditions

Given an array of integers arr[], the task is to count the number of valid pairs of elements from arr. A pair (arr[x], arr[y]) is… Read More »

## Sum of elements in an array with frequencies greater than or equal to that element

Given an array arr[] of N integers. The task is to find the sum of the elements which have frequencies greater than or equal to… Read More »

## Find the element having different frequency than other array elements

Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More »

## Find alphabet in a Matrix which has maximum number of stars around it

Given a matrix mat consisting of * and lowercase English alphabets, the task is to find the character which has the maximum number of *… Read More »

## Frequency of each element of an array of small ranged values

Given an array where elements in small range. The maximum element in the array does not go beyond size of array. Find frequencies of elements.… Read More »

## Python | Element with largest frequency in list

This is one of the most essential operation that programmer quite often comes in terms with. Be it development or competitive programming, this utility is… Read More »