Skip to content

Category Archives: Strings

Given two strings X and Y, the task is to find the length of the longest common substring.  Examples: Input: X = “GeeksforGeeks”, y =… Read More
Given a string S of length N, find the pattern of the strings as shown below in the examples. Examples:  Input: S = “Geek”Output: Geek,… Read More
Given a list of names in an array arr[] of size N, display the longest name contained in it. If there are multiple longest names… Read More
Given two strings S1 and S2 of the same length containing characters ranging from ‘0’ to ‘9’, the task is to return the minimum number… Read More
Given a binary string consisting of ‘0’ and ‘1’ only and an integer K, the task is to minimize the string as far as possible… Read More
Given a binary string S of size N, the task is to find the minimum number of removal required either from the start or end… Read More
Given an array of strings arr[] of length N, the task is to sort the strings in Lexicographical order. Examples: Input: arr[] = {“batman”, “bat”,… Read More
Given a binary string S, the task is to count the substrings having the number of 0s and 1s in the ratio of X :… Read More
Given a binary string S of size N and an integer K, the task is to divide S into K disjoint subsequences(empty subsequences are also… Read More
Given a string S of size N consisting of characters ‘0’ to ‘9’, the task is to print the longest palindrome that can be formed… Read More
Given a binary string S of length N and an integer X, the task is to check if there exists a right wise circular rotation… Read More
Given a string S consisting of only lowercase English letters of length N, the task is to find the count of substrings such that each… Read More
A string is a sequence of characters, often used to represent text. In programming, strings are a common data type and are used for a… Read More
Given string str of length N. The task is to determine whether a character is only occurring as a single contiguous substring or not i.e.,… Read More
Given a string  S of length N containing small-case English alphabets and an integer K, the task is to find the maximum possible length of… Read More

Start Your Coding Journey Now!