## Rearrange an array such that product of every two consecutive elements is a multiple of 4

Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »

- Maximum number of unique values in the array after performing given operations
- Sort a string according to the frequency of characters
- Count of subarrays which start and end with the same element
- Kth most frequent Character in a given String
- Frequency of each character in a String using unordered_map in C++
- Longest permutation subsequence in a given array
- Calculate the frequency of each word in the given string
- Count the elements having frequency equals to its value
- Count of greater elements for each element in the Array
- Largest number in the Array having frequency same as value
- Shortest subarray to be removed to make all Array elements unique
- Find ratio of zeroes, positive numbers and negative numbers in the Array
- Smallest Palindromic Subsequence of Even Length in Range [L, R]
- Count of subarrays of size K with elements having even frequencies
- Sort an array in descending order based on the sum of its occurrence
- Minimum number of swaps required to make the string K periodic
- Maximum element in an array which is equal to its frequency
- Sorting element of an array by frequency in decreasing order
- Find just strictly greater element from first array for each element in second array
- Queries to find frequencies of a string within specified substrings
- Two player game in which a player can remove all occurrences of a number
- Find the element in a linked list with frequency at least N/3
- Minimum characters to be replaced to make frequency of all characters same
- Total length of string from given Array of strings composed using given characters
- Split an array containing N elements into K sets of distinct elements
- Find element in array with frequency equal to sum of frequencies of other elements
- Subsequence pair from given Array having all unique and all same elements respectively
- Count of ordered triplets (R, G, B) in a given original string
- Frequency of smallest character in first sentence less than that of second sentence
- Find the count of even odd pairs in a given Array

Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »

Given a string S and an integer K, the task is to check if it is possible to distribute these characters into two strings such… Read More »

Given a string str consisting of lowercase alphabets, the task is to find the number of possible substrings (not necessarily distinct) that consists of distinct… Read More »

Given a binary array arr[], the task is to find the longest subarray of non-empty cells after the removal of at most 1 empty cell.… Read More »

Given a binary matrix V[][] of dimensions N * M, wherein each cell is either empty or blocked marked by a 0 and 1 respectively,… Read More »

Given three integers X, Y and N, the task is to find the largest number possible of length N consisting only of X and Y… Read More »

Given two arrays A[] and B[] consisting of N positive integers and a integer M, the task is to find the minimum value of X… Read More »

Given a string S, the task is to find the number of ways to split the given string S into two non-empty palindromic strings. Examples:… Read More »

Given an array arr[], the task is to generate a modified array such that all its elements are maximized by swapping of bits. Examples: Input:… Read More »

Given an array arr[] of size N, and Q queries of the form {i, k} for which, the task is to print the most frequent… Read More »

Given an array arr[] of N integers, the task is to find the size of largest subarray with frequency of all elements same. Examples: Input:… Read More »

Given a string str of length L, the task is to find the first occurrence of a non-repeating character in the string.Examples: Input: str =… Read More »

Given an array arr[] of length N, the task is to print the number of array elements which cannot form a pair with any other… Read More »

Given an integer array arr[] and Q queries, the task is to find the sum of the array for each query of the following type:… Read More »

Given a N-ary tree consisting of N nodes and a matrix edges[][] consisting of N – 1 edges of the form (X, Y) denoting the… Read More »