The Wayback Machine - https://web.archive.org/web/20250116224234/https://www.geeksforgeeks.org/string-data-structure/
Open In App

String in Data Structure

Last Updated : 11 Dec, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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.

Basics of Strings:

String in different language:

Basic Operations of String:

Please refer String Problems Topic Wise for the list of questions on different topics like binary string, subsequence and substring, pattern searching and palindrome.

Easy Problems on String:

Medium Problems on String:

Hard Problems on String:

Unlock your potential with our DSA Self-Paced course, designed to help you master Data Structures and Algorithms at your own pace. In 90 days, you’ll learn the core concepts of DSA, tackle real-world problems, and boost your problem-solving skills, all at a speed that fits your schedule. With comprehensive lessons and practical exercises, this course will set you up for success in technical interviews and beyond.

And here's the challenge – join the Three 90 Challenge! Complete 90% of the course in 90 days, and you’ll earn a 90% refund. It's a great way to stay motivated, track your progress, and reward yourself for your dedication. Start the challenge today, and push your limits to achieve mastery in DSA!


Article Tags :
Practice Tags :

Similar Reads

three90RightbarBannerImg