Skip to content

Tag Archives: substring

Given a string str and an integer N, the task is to print all possible sub-strings of length N. Examples: Input: str = “geeksforgeeks”, N… Read More
Given a string str and pos and len that defines the starting and the length of the subarray. The task is to generate a substring… Read More
Given a binary string S of size N, the task is to find the maximum possible value in exactly K step, where in each step,… Read More
Given two strings A and B of the same length and two positive integers K and T. The task is to find the longest substring… Read More
Given a String S which contains balanced Parentheses Brackets ( i.e ‘(‘ and ‘)’ ), we need to split them in such a way that… Read More
Given a string W, and two arrays X[] and B[] of size N each where the ASCII value of character X[i] is redefined to B[i].… Read More
Given a string S (‘a’ ≤ S[i] ≤ ‘t’) of length N (1 ≤ N ≤ 105), which consists of lowercase English alphabets, the task… Read More
Given a string S of length N (1 ≤ N ≤ 103) that consists of a digit from ‘0’ to ‘9’, the task is to… 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 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, the task is to count the substrings having the number of 0s and 1s in the ratio of X :… 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
INTRODUCTION: A string is a sequence of characters, often used to represent text. In programming, strings are a common data type and are used for… Read More

Start Your Coding Journey Now!