Skip to content

Tag Archives: substring

Given two binary strings A and B, the task is to find the minimum number of times a substring starting from the first character of… Read More
Given a string S, the task is to find the length of the longest substring between any pair of occurrences of same character. Examples:Attention reader!… Read More
Given a string S of length N consisting of lowercase letters and an integer K, where N % K = 0, the task is to… Read More
Given an array of strings S[] consisting of N distinct strings of length M. The task is to generate the longest possible palindromic string by… Read More
Given two strings A and B, the task is to find the smallest substring of A having B as a subsequence. Examples:Attention reader! Don’t stop… Read More
Given string str, the task is to check if it is possible to split the given string S into three palindromic substrings or not. If… Read More
Given string str, the task is to rearrange the given string to obtain the longest palindromic substring. Examples:Attention reader! Don’t stop learning now. Get hold… Read More
Given a string S of length N, the task is to find the length of the longest palindromic substring from a given string. Examples: Attention reader!… Read More
Given two strings A and B where string A is an anagram of string B. In one operation, remove the first or the last character… Read More
The SUBSTRING() function extracts a substring starting from a position in an input string with a given length. In the case of substring, you need… Read More
Given a string S representing a sentence and another string word, the task is to find the word from S which has the string word… Read More
Given string str, the task is to find the rank of the given string among all its substrings arranged lexicographically. Examples:Attention reader! Don’t stop learning… Read More
Given a string str, the task is to find the substring of length K which occurs the maximum number of times. If more than one… Read More
Given two strings A and B, the task is to find lexicographically the smallest permutation of string B such that it contains every substring from… Read More

Start Your Coding Journey Now!