Skip to content

Tag Archives: frequency-counting

Given a string, sort it in descending order. Examples:  Input : alkasingh Output : snlkihgaa Input : nupursingh Output : uusrpnnihg Input : geeksforgeeks Output… Read More
Given a string, find the maximum number of characters between any two characters in the string. If no character repeats, print -1.  Examples:   Input :… Read More
Given an unsorted array of n integers which can contains n integers. Count frequency of all elements that are present in array. Examples: Input :… Read More
Given two strings ‘s’ and ‘q’, check if all characters of q are present in ‘s’.  Examples:  Example: Input: s = "abctd" q = "cat"… Read More
Given a string S, the task is to remove all the duplicates in the given string. Below are the different methods to remove duplicates in a… Read More