## Sort a string according to the frequency of characters

Given a string str, the task is to sort the string according to the frequency of each character, in ascending order. If two elements have… Read More »

- Sort a string according to the frequency of characters
- Count of same length Strings that exists lexicographically in between two given Strings
- Smallest Palindromic Subsequence of Even Length in Range [L, R]
- Largest lexicographical string with at most K consecutive elements
- Lexicographically all Shortest Palindromic Substrings from a given string
- Lexicographically smallest K-length substring containing maximum number of vowels
- Lexicographically smaller string by swapping at most one character pair
- Make the string lexicographically smallest and non palindromic by replacing exactly one character
- K-th lexicographical string of given length
- Find the k-th string in lexicographical order consisting of n-2 X's and 2 Y's
- Lexicographically smallest array formed by at most one swap for every pair of adjacent indices
- Sort an Array alphabetically when each number is converted into words
- Generate all numbers up to N in Lexicographical Order

Given a string str, the task is to sort the string according to the frequency of each character, in ascending order. If two elements have… Read More »

Given a string of size N and some queries, the task is to find the lexicographically smallest palindromic subsequence of even length in range [L,… Read More »

Given two strings A and B of all uppercase letter, the task is to find whether is it possible to make string A strictly lexicographically… Read More »

Given two string S1 and S2 of length L, the task is to count the number of strings of length L, that exists in between… Read More »

Two players are playing a game where a string str is given. The first player can take the characters at even indices and the second… Read More »

Given two integers N and K. The task is to print the lexicographically smallest string of length N consisting of lower-case English alphabates such that… Read More »

Given an array arr[] of distinct elements, the task is to rearrange the array such that it is lexicographically smallest and of the form arr[0]… Read More »

Given a string str consisting of lowercase alphabets and an integer K, you can perform the following operations on str Initialize an empty string X… Read More »

Given an array of N integers. The task is to find the lexicographically smallest array possible by applying the given operation any number of times.… Read More »

Given a string S of size N and Q queries. Every query consists of L and R ( 0 < = L < = R… Read More »

Given string str of size N consists of lower-case English alphabets. The task is to find the arrangement of the characters of the string such… Read More »

Given a string str of lower case English alphabets. One can choose any two characters in the string and replace all the occurrences of the… Read More »

Given an array arr[] and an integer X, the task is to find the indices such that: The sum of elements on the found indices… Read More »

Given two strings s1 and s2, the task is to find whether the two string contain the same characters that occur in the same order.… Read More »

Given a balanced bracket sequence as a string str containing character ‘(‘ or ‘)’, the task is to find the next lexicographical order balanced sequence… Read More »