String Data StructureLast Updated : 26 Sep, 2023ReadDiscussCoursesDSA for BeginnersLearn more about String in DSA Self Paced CoursePractice Problems on StringWhat is String?Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’.String Data StructureBelow are some examples of strings:“geeks”, “for”, “geeks”, “GeeksforGeeks”, “Geeks for Geeks”, “123Geeks”, “@123 Geeks”How String is represented in Memory?In C, a string can be referred to either using a character pointer or as a character array. When strings are declared as character arrays, they are stored like other types of arrays in C. For example, if str[] is an auto variable then the string is stored in the stack segment, if it’s a global or static variable then stored in the data segment, etc.What is String & How String is represented in MemoryTopics:IntroductionString in different languageBasic Operations of StringBinary StringSubstring & SubsequencePalindromePattern SearchingStandard Problem on StringIntroduction:Introduction to Strings – Data Structure and Algorithm TutorialsApplications, Advantages and Disadvantages of StringStorage for Strings in CString in different language:Strings in CString Class in C++String Class in JavaPython StringC# | StringJavaScript StringPHP | StringsBasic Operations of String:Searching For Characters and Substring in a StringProgram to reverse a string (Iterative and Recursive)Left Rotation and Right Rotation of a StringSort string of charactersPrint the frequency of each character in Alphabetical orderSwap characters in a StringC program to find the length of a stringHow to insert characters in a string at a certain position?Program to check if two strings are same or notConcatenating Two StringsRemove all occurrences of a character in a stringBinary String:Change if all bits can be made same by single flipNumber of flips to make binary string alternateBinary representation of next numberMin flips of continuous characters to make all characters same in a stringGenerate all binary strings without consecutive 1’sFind i’th Index character in a binary string obtained after n iterationsGenerate n-bit Gray CodesSubstring & Subsequence:Program to print all substrings of a given stringPrint all subsequences of a stringCount Distinct SubsequencesCount distinct occurrences as a subsequenceLongest Common SubsequenceShortest Superstring ProblemPrinting Shortest Common SupersequenceShortest Common SupersequenceLongest Repeating SubsequenceLongest Palindromic SubsequenceLongest Palindromic Substring using Dynamic ProgrammingPalindrome:C Program to Check if a Given String is PalindromeCheck if a given string is a rotation of a palindromeCheck if characters of a given string can be rearranged to form a palindromeOnline algorithm for checking palindrome in a streamPrint all palindromic partitions of a stringMinimum characters to be added at front to make string palindromeMake largest palindrome by changing at most K-digitsMinimum number of deletions to make a string palindromeMinimum insertions to form a palindrome with permutations allowedPattern Searching:Naive algorithm for Pattern SearchingKMP Algorithm for Pattern SearchingZ algorithmSearch a Word in a 2D Grid of charactersWildcard Pattern MatchingAho-Corasick AlgorithmFind all strings that match specific pattern in a dictionaryCheck if string follows order of characters defined by a pattern or notStandard problems on String:Easy:Count strings with consecutive 1’sGenerate all binary strings from given patternAdd n binary stringsDivide large number represented as stringProgram to find Smallest and Largest Word in a StringCount number of equal pairs in a stringCamel case of a given sentenceSecond most repeated word in a sequencePrint all possible strings that can be made by placing spacesCheck if all levels of two trees are anagrams or notMedium:K’th Non-repeating CharacterQueries for characters in a repeated stringURLify a given string (Replace spaces is %20)Count of total anagram substringsCount number of binary strings without consecutive 1’sLexicographically next stringCheck if given string can be split into four distinct stringsWord Break ProblemCheck for balanced parentheses in an expression | O(1) spaceLength of Longest Balanced SubsequenceMinimum Swaps for Bracket BalancingConvert a sentence into its equivalent mobile numeric keypad sequenceBurrows – Wheeler Data Transform AlgorithmForm minimum number from given sequencePrint shortest path to print a string on screenMirror characters of a stringHard:Multiply Large Numbers represented as StringsCount ways to increase LCS length of two strings by oneMinimum rotations required to get the same stringFind if an array of strings can be chained to form a circleGiven a sorted dictionary of an alien language, find order of charactersRemove minimum number of characters so that two strings become anagramMinimum Number of Manipulations required to make two Strings Anagram Without Deletion of CharacterPalindrome Substring QueriesPowet Set in Lexicographic orderMinimum Word BreakMinimum number of bracket reversals needed to make an expression balancedWord Wrap problem ( Space optimized solution )Decode a string recursively encoded as count followed by substringQuick Links:‘Practice Problems’ on Strings‘Quizzes’ on StringsRecomended:Learn Data Structure and Algorithms | DSA TutorialIf you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to review-team@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.