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....
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:...
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:...
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 :...
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:...
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....
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....
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....
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:...
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....
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....
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....