Javascript Program To Remove Duplicates From A Given String
Write a javascript program for a given string S which may contain lowercase and uppercase characters. The task is to remove all duplicate characters from the string and find the resultant string....
read more
Count of elements not divisible by any other elements of Array
Given an array arr[], the task is to determine the number of elements of the array which are not divisible by any other element in the given array. Examples:...
read more
Javascript program for counting frequencies of array elements
In this article, we are given an array that may contain duplicate values. We will print all elements and their frequencies if the duplicates exist. We can do this by using two methods:...
read more
Javascript Program for Least frequent element in an array
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 them.Examples :...
read more
Find the player to last modify a string such that even number of consonants and no vowels are left in the string
Given a string S of length N containing lowercase alphabets. Two players A and B play a game optimally in turns, starting with player A. In each move, either of the following operations can be performed:...
read more
XOR of Prime Frequencies of Characters in a String
Given a string containing only lowercase english alphabets. The task is to find the bitwise XOR of all the prime frequencies of the characters in the string. If no prime frequency is present, then print -1....
read more
Minimum length of Run Length Encoding possible by removing at most K characters from a given string
Given a string S of length N, consisting of lowercase English alphabets only, the task is to find the minimum possible length of run-length-encoding that can be generated by removing at most K characters from the string S....
read more
Sum of all minimum frequency elements in Matrix
Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all minimum occurring elements in the given matrix. That is the sum of all such elements whose frequency is even in the matrix....
read more
Maximum number of parallelograms that can be made using the given length of line segments
Given N line segments where the length of the ith line segment is . The task is to find the maximum number of parallelograms can be made with those line segments if each line segment is used at most in one parallelogram.Examples:...
read more
Largest subarray with frequency of all elements same
Given an array arr[] of N integers, the task is to find the size of the largest subarray with frequency of all elements the same....
read more
Find the smallest after deleting given elements
Given an array of integers, find the smallest number after deleting given elements. In case of repeating elements, we delete one instance (from the original array) for every instance present in the array containing elements to be deleted....
read more
Most similar string
Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum count of matching characters with str....
read more