String in Data Structure Last Updated : 31 Aug, 2025 Suggest changes Share Like Article Like Report A string is a sequence of characters. The following facts make string an interesting data structure.Small set of elements. Unlike normal array, strings typically have smaller set of items. For example, lowercase English alphabet has only 26 characters. ASCII has only 256 characters.Strings are immutable in programming languages like Java, Python, JavaScript and C#. Many String Problems can optimized using the fact that the character set size is small. For example sorting can be done faster, counting frequencies of items is faster and many interesting interview questions are based on this.BasicsIntroduction to StringsIn Different LanguagesStrings in C String Class in C++String in JavaPython StringC# | StringJavaScript StringPHP | StringsBasic OperationsLength of a StringCheck for SameSearch a Character Insert a Character Remove a Character Remove all occurrences Concatenating Two StringsReverse a stringGenerate all SubstringsEasy ProblemsCheck for BinaryCamel Case ConversionSubstrings with Corners as 1sCheck for PanagramCheck for PalindromeCheck for SubstringCheck for SubsequenceCheck for Anagrams Check for K-Anagrams URLify a given string Medium Problems on String:First Repeating CharacterFirst Non-Repeating Character Check for Rotation K’th Non-repeating CharacterImplement atoi Validate IP Address Add n Binary StringsMultiply 2 Strings Isomorphic StringsRemove AdjacentRoman to IntegerInterleaved StringsPermutations of a StringLongest Palindromic Substring Anagram substringsBinary strings without consecutive 1’sLexicographically next stringSplit String into four distinct stringsWord Break ProblemMinimum Swaps for Bracket BalancingString to mobile numeric keypad sequence Shortest path to print a string on screen Hard Problems on String:Lexicographic Rank of a StringMultiply Large Numbers Ways to increase LCS length of 2 strings by one Alien DictionaryMake two strings AnagramMake two Strings Anagram Without DeletionPalindrome Substring Queries Word Search - 8 Directions and Straight MovementWord Search - 4 Directions and Zig-Zag AllowedMinimum bracket reversals to make balancedWord Wrap problemDecode a string encoded with recursive substring countsPlease refer String Problems Topic Wise for the list of questions on different topics like binary string, subsequence and substring, pattern searching and palindrome. H harendrakumar123 Follow Article Tags : Strings DSA Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 14 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 6 min read Problem of The Day - Develop the Habit of Coding 5 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like