Given binary string str, the task is to find the count of ways to partition the string such that each partitioned substring contains exactly two 0s....
Given a binary string S of length N and an integer K, the task is to find the maximum number of non-overlapping substrings that can be obtained by splitting it as per the following conditions:...
Given two strings S and W of sizes N and M respectively, the task is to remove the last occurrence of W from S. If there is no occurrence of W in S, print S as it is....
Given a string S of size N consisting of characters a, b, and c only, the task is to find the number of substrings of the given string S such that the frequency of character a is greater than the frequency of character c....
Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string....
The clear() method of AbstractQueue removes all of the elements from this queue. The queue will be empty after this call returns....
Given an integer K and a binary string S of length N, the task is to find out the number of substrings whose decimal equivalent is greater than or equal to K....
Given two strings str1 and str2, the task is to count the maximum consecutive occurrences of the string str2 in the string str1....
Given a binary string S, the task is to convert the given string S to its lexicographic maximum form by reversing substrings having an even number of 1s....
Given a string str of lowercase alphabets, the task is to remove minimum characters from the given string so that string can be break into 3 substrings str1, str2, and str3 such that each substring can be empty or can contains only characters ‘a’, ‘b’, and ‘c’ respectively.Example:...
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 “for”....