Skip to content

Tag Archives: frequency-counting

Given an array arr[] consisting of N positive integers, the task is to find the number of array elements whose highest power of 2 less… Read More
Given a string S consisting of N characters, the task is to print all palindromic strings of length 3 in lexicographical order that can be… Read More
Given a string S consisting of N lowercase characters, the task is to find the length of the longest substring consisting of an even number… Read More
Given 2 array of strings X and Y, the task is to find the number of superstrings in X. A string s is said to… Read More
Given a string, str of length N and a character X, the task is to find the maximum count of characters X that are to… Read More
Given an array arr[] consisting of N integers, the task is to find the total number of unordered pairs (i, j) in the array such… Read More
Given an array arr[] consisting of N positive integers, the task is to find the elements which are greater than at least half of the… Read More
Given a string S of size N consisting of lowercase characters, the task is to find the sum of Manhattan distance between each pair (i,… Read More
Given a binary string, S of size N, the task is to check if it is possible to partition the string into disjoint subsequences equal… Read More
Given two arrays A[] and B[] consisting of N positive integers and an integer K, the task is to find the Kth smallest element in… Read More
Given an array arr[] of size N and an integer K, the task is to find the maximum possible frequency of any array element by… Read More
Given three strings S, X, and Y consisting of N, A, and B characters respectively, the task is to find the number of occurrences of… Read More
Given an array A[] of size N, the task is to generate an array B[] based on the following conditions: For every array element A[i], find the most frequent… Read More
Given a sorted array arr[] consisting of N positive integers and an integer D, the task is to find the number of triplets (i, j,… Read More