Skip to content

Tag Archives: substring

Given a string S. The task is to check whether it is possible to rearrange the string such that every substring of odd length is… Read More
Given a string str consisting of lowercase English alphabets, the task is to find the count of substrings that start with “geeks” and end with… Read More
Given a string. The task is to find the maximum number P, such that a given string can be partitioned into P contiguous substrings such… Read More
Given an input string and a substring. Find the frequency of occurrences of a substring in the given string using pthreads. Examples:Attention reader! Don’t stop… Read More
Given a string str, the task is to repeat every substring of the string X number of times where X is the number composed of… Read More
Given a string s of size N. The task is to find the largest substring which consists of same charactersExamples:   Input : s = “abcdddddeff” Output… Read More
Given a string str containing lowercase English characters, we can perform the following two operations on the given string:  Remove the entire string. Remove a… Read More
Given two strings A and B. The task is to find the minimum number of times A has to be repeated such that B is… Read More
Given a balanced parenthesis string which consists of ‘(‘ and ‘)‘. The task is to find the number of balanced parenthesis substrings in the given… Read More
Given binary string S of size N and a number K. The task is to find the Longest sub string of 0’s in the string… Read More
Given a string S and a character K. The task is to find the length of the longest substring of S having all characters the… Read More
Given a string str and a character ch, the task is to find the longest palindromic sub-string of str such that it starts and ends… Read More
Given binary string str, the task is to find the count of non-overlapping sub-strings of either the form “010” or “101”. Examples: Attention reader! Don’t stop… Read More
Given a string str, the task is to find the count of distinct characters in all the distinct sub-strings of the given string.Examples:   Input: str… Read More
Given a string str containing lowercase alphabets, the task is to count the sub-strings that contain all the vowels at-least one time and there are… Read More