## Given a sequence of words, print all anagrams together | Set 1

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

- Count common characters in two strings
- Repeated Character Whose First Appearance is Leftmost
- Convert character array to string in C++
- Count substrings that contain all vowels | SET 2
- Find the longest string that can be made up of other strings from the array
- Minimum number of times A has to be repeated such that B is a substring of it
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Check whether two strings contain same characters in same order
- Rearrange characters in a string such that no two adjacent are same using hashing
- Generate all permutations of a string that follow given constraints
- Java program to check whether a string is a Palindrome
- Check if two strings are same ignoring their cases
- Minimum number of adjacent swaps to convert a string into its given anagram
- Program to generate all possible valid IP addresses from given string | Set 2
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Maximize the happiness of the groups on the Trip
- Find the number of binary strings of length N with at least 3 consecutive 1s
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Implement a Dictionary using Trie
- Minimum rotations required to get the same String | Set-2
- Check if a string can be obtained by rotating another string d places
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Append a digit in the end to make the number equal to the length of the remaining string
- Count of substrings which contains a given character K times
- C++ program to compare two Strings using Operator Overloading
- Reverse individual words with O(1) extra space
- Minimum number of sub-strings of a string such that all are power of 5
- Persistent Trie | Set 1 (Introduction)
- Find uncommon characters of the two strings | Set 2

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

Given a string, find the longest substring which is palindrome. For example, if the given string is “forgeeksskeegfor”, the output should be “geeksskeeg”. Recommended: Please… Read More »

Given a string, move all even positioned elements to end of string. While moving elements, keep the relative order of all even positioned and odd… Read More »

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. It may be assumed… 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 »