## Replace each element by the difference of the total size of the array and frequency of that element

Given an array of integers, the task is to replace every element by the difference of the total size of the array and its frequency.… Read More »

- Sorting a Map by value in C++ STL
- Real-time application of Data Structures
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Check if given words are present in a string
- Count of subarrays having exactly K perfect square numbers
- Kth most frequent Character in a given String
- Count of substrings of length K with exactly K distinct characters
- LRU Cache in Python using OrderedDict
- Count triplets such that sum of any two number is equal to third | Set 2
- CamelCase Pattern Matching
- Length of the smallest substring which contains all vowels
- Remove odd frequency characters from the string
- Longest permutation subsequence in a given array
- Check if an Array is a permutation of numbers from 1 to N
- Longest increasing sub-sequence formed by concatenating array to itself N times
- Quadratic Probing in Hashing
- Count of greater elements for each element in the Array
- Count the elements having frequency equals to its value
- Find k most frequent in linear time
- Count triplets in an array such that i<j<k and a[j] - a[i] = a[k] - a[j] = D
- Minimum number of Water to Land conversion to make two islands connected in a Grid
- Program to implement Separate Chaining in C++ STL without the use of pointers
- Count of subarrays whose sum is a perfect square
- Maximum sum subarray having sum less than or equal to given sum using Set
- Shortest subarray to be removed to make all Array elements unique
- Lexicographical smallest number after at most K consecutive swaps
- Sum and product of K smallest and largest Fibonacci numbers in the array
- Replace each element of Array with it's corresponding rank
- Largest lexicographical string with at most K consecutive elements
- Count distinct substrings of a string using Rabin Karp algorithm

Given an array of integers, the task is to replace every element by the difference of the total size of the array and its frequency.… Read More »

Given an integer array arr, the task is to print the minimum number of operations required to delete all elements of the array. In an… Read More »

Given the number of cities n numbered from 0 to n-1 and the cities in which stations are located, the task is to find the… Read More »

Given a range of numbers [l, r] and an integer . The task is to count all such number in the given range such that… Read More »

Given a string ‘str’ containing lowercase English alphabets, the task is to find whether the frequencies of the characters of the string are in Lucas… Read More »

Generate a random, unique, alpha-numeric string using PHP. Examples: EA070 aBX32gTf APPROACH 1: Brute Force The first approach is the simplest one to understand and… Read More »

Given an array of integers, remove the elements from the array whose frequency lies in the range [l, r]. Examples: Input : arr[] = {… Read More »

Given an array of integers, find the elements from the array whose frequency lies in the range [l, r]. Examples: Input : arr[] = {… Read More »

Given an array of integers, replace every element by its frequency in the array. Examples: Input : arr[] = { 1, 2, 5, 2, 2,… Read More »

Given an array of integers, find the k smallest numbers after deleting given elements. In case of repeating elements delete only one instance in the… Read More »

Given an array of integers, find the k largest number after deleting the given elements. In case of repeating elements, delete one instance for every… Read More »

Given an array of integers, remove all the elements which appear strictly less than k times. Examples: Input : arr[] = {1, 2, 2, 3,… Read More »

Given an unsorted array of integers, Print the array after removing the duplicate elements from it. We need to print distinct array elements according to… Read More »

Given an array of integers, remove all the occurrences of those elements which appear strictly more than k times in the array. Examples: Input :… Read More »

Given an array of elements and change the array in such a way that all the elements on the array are distinct. if you are… Read More »