# String Data Structure

**‘Recent Articles’ on Strings**

**Topic :**

- Strings in C
- Storage for Strings in C
- String Class in C++
- String Class in Java
- Strings in Python : Set 1, Set 2
- String Methods in Python : Set 1 , Set 2 , Set 3
- Print reverse of a string using recursion
- Reverse an array without affecting special characters
- Remove all duplicates from a given string
- Pangram Checking
- How to split a string in C/C++, Python and Java?
- Remove spaces from a given string

**Character Counting Based Problems :**

- Return maximum occurring character in an input string
- Find the smallest window in a string containing all characters of another string
- C program to find second most frequent character
- K’th Non-repeating Character
- Count number of substrings with exactly k distinct characters
- Find k’th character of decrypted string
- Count characters at same position as in English alphabets
- Check if two strings are k-anagrams or not
- Count words in a given string
- Count of words whose i-th letter is either (i-1)-th, i-th, or (i+1)-th letter of given word
- Count substrings with same first and last characters
- Maximum consecutive repeating character in string
- Count of strings that can be formed using a, b and c under given constraints
- Group words with same set of characters
- Count of total anagram substrings
- Substring with highest frequency length product
- Number of even substrings in a string of digits
- Print all distinct characters of a string in order (3 Methods)
- Smallest window that contains all characters of string itself
- Print common characters of two Strings in alphabetical order
- Program to count occurrence of a given character in a string
- Minimum sum of squares of character counts in a given string after removing k characters
- Program to count vowels in a string (Iterative and Recursive)
- Number of distinct permutation a String can have
- Check if both halves of the string have same set of characters
- Count words that appear exactly two times in an array of words
- Check if frequency of all characters can become same by one removal
- Count ways to increase LCS length of two strings by one
- Print the string after the specified character has occurred given no. of times
- Remove characters from the first string which are present in the second string

- Check whether two strings are anagram of each other
- Given a sequence of words, print all anagrams together | Set 1
- Given a sequence of words, print all anagrams together | Set 2
- Anagram Substring Search
- Print all pairs of anagrams in a given array of strings
- Remove minimum number of characters so that two strings become anagram
- Check if two strings are k-anagrams or not
- Check if binary representations of two numbers are anagram
- Given a sequence of words, print all anagrams together using STL

- C Program to Check if a Given String is Palindrome
- Check if a given string is a rotation of a palindrome
- C++ Program to print all palindromes in a given range
- Check if characters of a given string can be rearranged to form a palindrome
- Dynamic Programming | Set 28 (Minimum insertions to form a palindrome)
- Longest Palindromic Substring | Set 2
- Print all palindromic partitions of a string
- Find all distinct palindromic sub-strings of a given string
- Online algorithm for checking palindrome in a stream
- Given a string, print all possible palindromic partitions
- Count All Palindromic Subsequence in a given String
- Minimum characters to be added at front to make string palindrome
- Palindrome Substring Queries
- Suffix Tree Application 6 – Longest Palindromic Substring
- Palindrome pair in an array of words (or strings)
- Make largest palindrome by changing at most K-digits
- Lexicographically first palindromic string
- Recursive function to check if a string is palindrome
- Minimum number of Appends needed to make a string palindrome
- Longest Non-palindromic substring
- Minimum number of deletions to make a string palindrome
- Minimum steps to delete a string after repeated deletion of palindrome substrings
- Count of Palindromic substrings in an Index range
- Minimum insertions to form a palindrome with permutations allowed
- Nth Even length Palindrome

- Change if all bits can be made same by single flip
- Length of Longest sub-string that can be removed
- Number of flips to make binary string alternate
- Efficient method for 2’s complement of a binary string
- Count binary strings with k times appearing adjacent two set bits
- Given a binary string, count number of substrings that start and end with 1
- Count strings with consecutive 1’s
- Generate all binary strings from given pattern
- Add two bit strings
- Count number of binary strings without consecutive 1’s
- Generate all binary permutations such that there are more or equal 1’s than 0’s before every point in all permutations
- Check if a string follows a^nb^n pattern or not
- Binary representation of next number
- Binary representation of next greater number with same number of 1’s and 0’s
- Decimal representation of given binary string is divisible by 5 or not
- Check if a binary string has a 0 between 1s or not | Set 1
- Check if a binary string has a 0 between 1s or not | Set 2
- Min flips of continuous characters to make all characters same in a string
- Program to add two binary strings
- Ways to remove one element from a binary string so that XOR becomes zero

- Number of subsequences of the form a^i b^j c^k
- Number of subsequences in a string divisible by n
- Find number of times a string occurs as a subsequence in given string
- Count Distinct Subsequences
- Count distinct occurrences as a subsequence
- Longest common subsequence with permutations allowed
- Repeated subsequence of length 2 or more
- Maximum length prefix of one string that occurs as subsequence in another
- Count distinct occurrences as a subsequence
- Print all longest common sub-sequences in lexicographical order
- Printing Longest Common Subsequence
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9
- Printing Longest Common Subsequence | Set 2
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9 | Set 2
- Printing Shortest Common Supersequence
- A Space Optimized Solution of LCS
- Given two strings, find if first string is a subsequence of second
- Shortest Common Supersequence
- Longest Repeating Subsequence
- Find largest word in dictionary by deleting some characters of given string
- Dynamic Programming | Set 12 (Longest Palindromic Subsequence)
- Minimum number of palindromic subsequences to be removed to empty a binary string
- Count All Palindromic Subsequence in a given String
- Queries on subsequence of string

- Searching for Patterns | Set 1 (Naive Pattern Searching)
- Searching for Patterns | Set 2 (KMP Algorithm)
- Searching for Patterns | Set 3 (Rabin-Karp Algorithm)
- Searching for Patterns | Set 5 (Finite Automata)
- Pattern Searching | Set 7 (Boyer Moore Algorithm – Bad Character Heuristic)
- String matching where one string contains wildcard characters
- Anagram Substring Search
- Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 1
- Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 2
- Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 3
- Manacher’s Algorithm – Linear Time Longest Palindromic Substring – Part 4
- Z algorithm
- Search a Word in a 2D Grid of characters
- Find all occurrences of a given word in a matrix
- Maximum length prefix of one string that occurs as subsequence in another
- Wildcard Pattern Matching
- Replace all occurrences of string AB with C without using extra space
- Aho-Corasick Algorithm
- Find all the patterns of “1(0+)1” in a given string | SET 1
- Find all the patterns of “1(0+)1” in a given string | SET 2

- A Program to check if strings are rotations of each other or not
- Print all the duplicates in the input string
- Write a program to print all permutations of a given string
- Divide a string in N equal parts
- Given a string, find its first non-repeating character
- Print list items containing all characters of a given word
- Reverse words in a given string
- Run Length Encoding
- Print all permutations with repetition of characters
- Rearrange a string so that all same characters become d distance away
- Recursively remove all adjacent duplicates
- Remove “b” and “ac” from a given string
- Find the first non-repeating character from a stream of characters
- String matching where one string contains wildcard characters
- An in-place algorithm for String Transformation
- Lexicographic rank of a string
- Check whether a given string is an interleaving of two other given strings
- Given a sorted dictionary of an alien language, find order of characters
- Find Excel column name from a given column number
- C Program to Sort an array of names or strings
- Print all possible words from phone digits
- Rearrange a string so that all same characters become d distance away
- C++ Program to remove spaces from a string
- Recursively print all sentences that can be formed from list of word lists
- Check if a given sequence of moves for a robot is circular or not
- Find the longest substring with k unique characters in a given string
- Function to find Number of customers who could not get a computer
- Find maximum depth of nested parenthesis in a string
- Find if a given string can be represented from a substring by iterating the substring “n” times
- Print all possible strings that can be made by placing spaces
- Check a given sentence for a given set of simple grammer rules
- Remove recurring digits in a given number
- Check if edit distance between two strings is one
- Recursive Implementation of atoi()
- Length of the longest valid substring
- Check if two given strings are isomorphic to each other
- Print string of odd length in ‘X’ format
- Transform One String to Another using Minimum Number of Given Operation
- Print all ways to break a string in bracket form
- All combinations of strings that can be used to dial a number
- Caesar Cipher
- Print Concatenation of Zig-Zag String in ‘n’ Rows

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above