Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.8K+ articles
Strings
2.1K+ articles
Dynamic Programming
1.1K+ articles
Hash
831+ articles
frequency-counting
745+ articles
Pattern Searching
401+ articles
substring
358+ articles
Data Structures
152+ articles
Java-String-Programs
148+ articles
strings
139+ posts
Recent Articles
Count Distinct Vowels in String
Last Updated: 27 September 2026
Given a string s, count the total distinct vowels in the string. The string s contains lowercase letters only.Examples:Input: s = geeksforgeeksOutput: 2Explanation: String...
read more
DSA
strings
String Comparison
Last Updated: 26 September 2026
Given two strings s1 and s2 and compare them lexicographically. Return 0 if both the strings are equal, 1 if s1 is greater than s2, and -1 if s1 is lesser than s2.Note: Le...
read more
DSA
strings
Array Product Even or Odd
Last Updated: 17 September 2026
Given an array arr[] of integers, find if product of all its elements is even or odd.Examples:Input: arr[] = [2, 4, 3, 5]Output: EvenExplanation: Product = 2 * 4 * 3 * 5 =...
read more
DSA
strings
MATHEMATICS
Two Non-Overlapping Substrings
Last Updated: 14 September 2026
Given a string s consisting of uppercase English letters, find if it contains the two substrings "XY" and "YX" such that they do not overlap with each other. The substring...
read more
DSA
strings
Remove Common and Concat
Last Updated: 14 September 2026
Given two strings, s1 and s2. The task is to remove all characters that are common in both strings and then combine the remaining characters from each string to form a new...
read more
DSA
Hash
strings
Count Types of Characters
Last Updated: 15 September 2026
Given a string s, count the occurrence of the following in it.Lowercase charactersUppercase charactersSpecial charactersNumeric ValuesNote: There are no white spaces in th...
read more
DSA
strings
Last index of One
Last Updated: 08 September 2026
Given a string s consisting only of '0' and '1', find the last index at which '1' occurs. If '1' is not present in the string, return -1.Examples:Input: s = "01001"Output:...
read more
DSA
strings
Linear Search
Check if Specific Frequency Sum is Even in String
Last Updated: 14 September 2026
Given a string s consisting of lowercase English letters, find if sum of two values x and y is even.x is the number of distinct characters that are at even positions in th...
read more
DSA
BIT
Hash
strings
Find the Smallest Greater Date with Same Digits
Last Updated: 18 August 2026
Given a date in the format dd mm yyyy, rearrange its digits to form a valid date that is greater than the given date. The new date must:Use exactly the same digits as the ...
read more
DSA
date-time-program
strings
Non-Repetitive String
Last Updated: 31 July 2026
Given a string s consisting of uppercase English letters, determine whether it is a non-repetitive string. A string is called non-repetitive if every occurrence of the sam...
read more
DSA
strings
Check if Any Common String Exists in Two Arrays
Last Updated: 26 July 2026
Given two arrays of strings s[] and t[] of sizes n and m, respectively, find if they share at least one common string.Examples:Input: s[] = ["cake", "pastry", "fish", "can...
read more
DSA
strings
Assign Short Codes in Stream of Words
Last Updated: 20 July 2026
A railway department is renaming several cities, and the corresponding railway station codes must also be updated.Given an array cities[] containing the names of n cities ...
read more
DSA
Trie
cpp-vector
Data Structures
strings
Distinct Characters In Sorted Manner
Last Updated: 18 July 2026
Given a string s, return a string containing all distinct characters from s in non-decreasing order, without using any sorting algorithm.Examples:Input: s = "abdbc"Output:...
read more
DSA
strings
set
DSA
Keypad typing
Last Updated: 10 July 2026
Given a string s consisting of lowercase English letters. Each letter corresponds to a number on a standard keypad, as shown in the figure. Replace every character in s wi...
read more
DSA
strings
DSA
Palindrome With K Insertions
Last Updated: 03 July 2026
Given a string s and an integer k, determine whether s can be converted into a palindrome using exactly k insertions. In a single insertion, any character may be inserted ...
read more
DSA
Algorithms-Dynamic Programming
strings
1
2
3
4
...
10
✕