Skip to content

Tag Archives: lexicographic-ordering

Given a positive integer K, the task is to find lexicographically the smallest string that can be generated by using the first K lowercase alphabets… Read More
Given an array arr[] consisting of N integers, the task is to find the lexicographically largest permutation of the given array possible by exactly one… Read More
Given a positive integer N, the task is to find the lexicographically largest string consisting of lower-case English alphabets such that the sum of the… Read More
Given a string S consisting of N lowercase characters, the task is to find the starting and the ending indices ( 0-based indexing ) of… Read More
Given a string S of length N, the task is to find the lexicographically smallest K-length subsequence from the string S (where K < N). … Read More
Given an array arr[] of size N, the task is to find the lexicographically smallest permutation of the given array such that the sum of… Read More
Given an array arr[] of size N, the task is to find the lexicographically largest permutation array by reversing any suffix subarrays from the array.… Read More
Given two positive integers N and K, the task is to find lexicographically the smallest permutation of first N natural numbers such that there are… Read More
Given a string S of length N and an integer K, the task is to find the frequency of the lexicographically Kth smallest character present… Read More
Given a binary string S of length N, the task is to find the lexicographic rank of the given string. Examples: Input: S = “001”Output:… Read More
Given a string S of size N and a positive integer K, the task is to perform atmost K operations on string S to make… Read More
Given two strings A and B of length M and N respectively, the task is to find the minimum swapping of two characters required to… Read More
Given an array of strings Files[], representing name of some files, the task is to sort the array based on the lexicographical order of the… Read More