# Category Archives: Strings

Given a binary string S of even size that contains only 0s and 1s, the task is to find the minimum flips (that is 0… Read More
Given a String ( S ) of length N and with that String, we need to print a triangle out of it. The triangle should… Read More
Given an array of strings S[] of size X where each string has length N. In one move, you can swap the ith character of… Read More
Given a string S of length N consisting of digits from ‘0’ to ‘9’ .The task is to determine the total number of possible ways… Read More
Given a string S, the task is to find out the length of the smallest substring of S that needs to be rearranged so that… Read More
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