## Counting values greater than equal to x after increments

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

Given a string of length n of capital letters. The task is to find the count of ‘GFG’ subsequence in the given string. Examples: Input… Read More »

Suppose we have an elements in ArrayList, we can count the occurrences of elements present in a number of ways. HashMap This data structure uses… Read More »

Given a string S. Count number of substrings in which each character occurs at most k times. Assume that the string consists of only lowercase… Read More »

Two strings are given, we need to find whether we can form second string by swapping the character of the first string. Examples: Input :… Read More »

Given an array arr[] of n positive integer. The task is find the size of the subset formed from the elements of the given array… Read More »

Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one… Read More »

You are given a string s(only lowercase alphabets) with length n. Print the position of every character of the String it must acquire so that… Read More »

Given a string, find minimum number of changes to it so that all substrings of the string become distinct. Examples : Input : str =… Read More »

Given an array, find the least frequent element in it. If there are multiple elements that appear least number of times, print any one of… Read More »

You are given two strings str1 and str2. You have to check if the two strings share a common substring. Examples : Input : str1… Read More »

Given a list of strings, find the largest string among all. Largest string is the string with largest number of unique characters. Example : Input… Read More »

Given a linked list of characters. The task is to find the maximum occurring character in the linked list. if their are multiple answer return… Read More »

Given an array of N integers. We need to find an index such that Frequency of Even numbers on its left side is equal to… Read More »

Given a string, convert the string to palindrome without any modifications like adding a character, removing a character, replacing a character etc. Examples: Input :… Read More »