## Print all permutations in sorted (lexicographic) order

Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB,… Read More »

- Print all permutations of a string in Java
- Methods to concatenate string in C/C++ with Examples
- Check for balanced parentheses in Python
- Coviam Software Developer Internship Experience
- Java Program to print distinct permutations of a string
- Find the first maximum length even word from a string
- Count common characters in two strings
- Repeated Character Whose First Appearance is Leftmost
- Arcesium Interview Experience ( FTE On-Campus)
- Operations required to make the string empty
- Java ArrayList to print all possible words from phone digits
- Check whether two strings contain same characters in same order
- Program to find the kth character after decrypting a string
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Count of words that are present in all the given sentences
- Generate all permutations of a string that follow given constraints
- Minimum length substring with exactly K distinct characters
- Count occurrences of a string that can be constructed from another given string
- Maximize the happiness of the groups on the Trip
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Find the minimum number of preprocess moves required to make two strings equal
- Find the longest string that can be made up of other strings from the array
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Maximize the value of A by replacing some of its digits with digits of B
- Check if two strings are same ignoring their cases
- Minimum steps to delete a string by deleting substring comprising of same characters
- Print the longest prefix of the given string which is also the suffix of the same string
- Minimum rotations required to get the same String | Set-2
- Convert character array to string in C++
- Find k-th character of decrypted string | Set - 2

Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB,… Read More »

Given a string, find its rank among all its permutations sorted lexicographically. For example, rank of “abc” is 1, rank of “acb” is 2, and… Read More »

Given a number, find the next smallest palindrome larger than this number. For example, if the input number is “2 3 5 4 5”, the… Read More »

Given a string, a partitioning of the string is a palindrome partitioning if every substring of the partition is a palindrome. For example, “aba|b|bbabb|a|b|aba” is… Read More »

Pattern searching is an important problem in computer science. When we do search for a string in notepad/word file or browser or database, pattern searching… Read More »

Given a sequence, find the length of the longest palindromic subsequence in it. As another example, if the given sequence is “BBABCBCAB”, then the output… Read More »

Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that… Read More »

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to… Read More »

Given two strings str1 and str2, write a function that prints all interleavings of the given two strings. You may assume that all characters in… Read More »

Given a string of length n, print all permutation of the given string. Repetition of characters is allowed. Print these permutations in lexicographically sorted order… Read More »

Given a string str, find the length of the longest substring without repeating characters. For “ABDEFGABEF”, the longest substring are “BDEFGA” and “DEFGAB”, with length… Read More »

We have discussed Overlapping Subproblems and Optimal Substructure properties in Set 1 and Set 2 respectively. We also discussed one example problem in Set 3.… Read More »

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More »

Given two strings string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2 efficiently. Examples: Input: string… Read More »