Skip to content

Tag Archives: Java-HashMap

Given two strings S1 of size N and S2 of size M, the task is to find the lexicographically smallest and the largest anagrams of… Read More
Given two strings A and B, the task is to count the minimum number of operations required to convert the string A to B. In… Read More
Given string str, the task is to minimize the total cost to remove all the characters from the string in alphabetical order. The cost of… Read More
Given that integers are being read from a data stream. Find the mode of all the elements read so far starting from the first integer… Read More
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and… Read More
Given a Roman numeral, the task is to find the corresponding decimal value. Note: Roman numerals are represented by seven different symbols: I, V, X,… Read More
Given a string str, consisting of lowercase English alphabets, the task is to calculate the sum of indices(1-based indexing) of the characters removed to obtain… Read More
Given an array arr[] consisting of N integers, the task is to find the largest subarray consisting of unique elements only. Examples: Input: arr[] =… Read More
Given an array arr[] consisting of N integers, the task is to find the length of the smallest subarray with sum equal to K. Examples:… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum count of decreasing subsequences possible from an array which satisfies… Read More
Given a string S, the task is to check if S contains a pair of substrings of length K which are anagrams of each other… Read More
Give binary string str and an integer N, the task is to check if the substrings of the string contain all binary representations of non-negative… Read More
Given an array arr[], the task is to rearrange the array to generate maximum decreasing subsequences and print the count of the maximum number of… Read More
Given a string S in the form of a sentence, the task is to find the word from the text with maximum number of its… Read More
Given a string, count the number of distinct substrings using Rabin Karp Algorithm. Examples:  Input : str = “aba” Output : 5 Explanation : Total… Read More