Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
frequency-counting
730+ articles
binary-string
370+ articles
substring
340+ articles
DSA
>
Data Structures
>
Strings
Strings
3.2k+ posts
Popular Articles
Recent Articles
Check if a string is substring of another
Last Updated: 16 October 2024
Given two strings txt and pat, the task is to find if pat is a substring of txt. If yes, return the index of the first occurrence, else retu
...read more
Strings
DSA
Comparing two strings in C++
Last Updated: 23 June 2022
Given two strings, how to check if the two strings are equal or not.Examples:Input : ABCD, XYZOutput : ABCD is not equal to XYZ XYZ
...read more
Strings
cpp-string
DSA
Check if String Contains Substring in Python
Last Updated: 20 June 2024
This article will cover how to check if a Python string contains another string or a substring in Python. Given two strings, check whether a
...read more
Strings
Python
Python string-programs
DSA
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
frequency-counting
730+ articles
binary-string
370+ articles
substring
340+ articles
Convert Infix To Prefix Notation
Last Updated: 03 February 2025
Given an infix expression consisting of operators (+, -, *, /, ^) and operands (lowercase characters), the task is to convert it to a prefix
...read more
Strings
Stack
expression-evaluation
DSA
Sort string of characters
Last Updated: 02 May 2025
Given a string of lowercase characters from 'a' - 'z'. We need to write a program to print the characters of this string in sorted order.Exa
...read more
Strings
Sorting
Hash
DSA
Sort a String in Java (2 different ways)
Last Updated: 18 March 2024
The string class doesn't have any method that directly sorts a string, but we can sort a string by applying other methods one after another.
...read more
Strings
Java
Sorting
Java-Strings
Java-String-Programs
DSA
Print all subsequences of a string
Last Updated: 18 October 2024
Given a string, we have to find out all its subsequences of it. A String is said to be a subsequence of another String, if it can be obtaine
...read more
Strings
Java
subsequence
Recursion
DSA
All substrings of a given String
Last Updated: 14 February 2025
Given a string s, containing lowercase alphabetical characters. The task is to print all non-empty substrings of the given string.Examples :
...read more
Strings
strings
DSA
Basic Coding Problems
Vigenère Cipher
Last Updated: 18 July 2024
Vigenere Cipher is a method of encrypting alphabetic text. It uses a simple form of polyalphabetic substitution. A polyalphabetic cipher is
...read more
Strings
Technical Scripter
DSA
How to split a string in C/C++, Python and Java?
Last Updated: 11 January 2025
Splitting a string by some delimiter is a very common task. For example, we have a comma-separated list of items from a file and we want ind
...read more
Strings
Java
Python
CPP-Library
cpp-string
C Language
C++
Java-String-Programs
DSA
Longest Common Substring
Last Updated: 30 September 2024
Given two strings 's1' and 's2', find the length of the longest common substring.Example:Input: s1 = "GeeksforGeeks", s2 = "GeeksQuiz"Output
...read more
Strings
Microsoft
Amazon
Morgan Stanley
Dynamic Programming
DSA
Longest Palindromic Subsequence (LPS)
Last Updated: 10 March 2025
Given a string s, find the length of the Longest Palindromic Subsequence in it. Note: The Longest Palindromic Subsequence (LPS) is the maxim
...read more
Strings
Amazon
Linkedin
PayPal
Dynamic Programming
palindrome
subsequence
LCS
Rivigo
strings
DSA
First non-repeating character of given string
Last Updated: 07 April 2025
Given a string s of lowercase English letters, the task is to find the first non-repeating character. If there is no such character, return
...read more
Strings
Amazon
Morgan Stanley
Goldman Sachs
D-E-Shaw
Accolite
Payu
MAQ Software
MakeMyTrip
InfoEdge
Ola Cabs
OATS Systems
Teradata
Tejas Network
cpp-pair
DSA
Print all the duplicate characters in a string
Last Updated: 30 July 2024
Given a string S, the task is to print all the duplicate characters with their occurrences in the given string.Example:Input: S = "geeksforg
...read more
Strings
String Duplicates
DSA
Remove duplicates from a string
Last Updated: 11 September 2024
Given a string s which may contain lowercase and uppercase characters. The task is to remove all duplicate characters from the string and fi
...read more
Strings
frequency-counting
DSA
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !