## Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1’s

Given an integer N, the task is to count the number of binary strings possible of length N such that they don’t contain “111” as… Read More »

## Count all substrings having character K

Given a string str and a character K, the task is to find the count of all the substrings of str that contain the character… Read More »

## Contiguous unique substrings with the given length L

Given a string str and an integer L. The task is to print all the unique substring of length L from string str. Examples: Input:… Read More »

## Count number of substrings of a string consisting of same characters

Given a string. The task is to find out the numbers of substrings consisting of the same characters. Examples: Input: abba Output: 5 The desired… Read More »

## Find the longest sub-string which is prefix, suffix and also present inside the string | Set 2

Given string str. The task is to find the longest sub-string which is a prefix, a suffix and a sub-string of the given string, str.… Read More »

## Longest substring such that no three consecutive characters are same

Given string str, the task is to find the length of the longest substring of str such that no three consecutive characters in the substring… Read More »

## Reverse the given string in the range [L, R]

Given a string str, and two integers L and R, the task is to reverse the string in the range [L, R] i.e. str[L…R]. Examples:… Read More »

## Largest substring of str2 which is a prefix of str1

Given two string str1 and str2, the task is to find the longest prefix of str1 which is present as a substring of the string… Read More »

## Check if string can be rearranged so that every Odd length Substring is Palindrome

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 »

## Number of substrings that start with “geeks” and end with “for”

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 »

## Maximum String Partition

Given a string. The task is to find the maximum number P, such that given string can be partitioned into P contiguous substrings such that… Read More »

## Frequency of a substring in a string using pthread

Given an input string and a substring. Find the frequency of occurrences of a substring in the given string using pthreads. Examples: Input: string =… Read More »

## Repeat substrings of the given String required number of times

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 »

## Largest substring with same Characters

Given a string s of size N. The task is to find the largest substring which consists of same characters Examples: Input : s =… Read More »

## Maximum number of given operations to remove the entire string

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 »