Replace two substrings (of a string) with each other
Given 3 strings S, A and B. The task is to replace every sub-string of S equal to A with B and every sub-string of… Read More »
Given 3 strings S, A and B. The task is to replace every sub-string of S equal to A with B and every sub-string of… Read More »
Given two string A and B which represents two integers, the task is to print the maximized value of A after replacing 0 or more… Read More »
Given a string str, containing upper case and lower case characters. In a single operations, any lowercase character can be converted to an uppercase character… Read More »
Given a string str containing lowercase characters, the task is to find the lexicographically largest sub-sequence of str. Examples: Input: str = “abc” Output: c… Read More »
Given two strings a and b, the task is to count the number of common divisors of both the strings. A string s is a… Read More »
Given a string str containing lower case alphabets and character ‘?’. The task is to check if it is possible to make str good or… Read More »
Given a string str and an integer k. The task is to count the occurrences of sub-strings of length k that consist of the same… Read More »
Given a string str containing lowercase alphabets (a – z). The task is to print the string after rearranging some characters such that the string… Read More »
Given a string str of length n (n is a multiple of 3) containing characters only from the set {0, 1, 2}. The task is… Read More »
Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »
Given a string str, the task is to make the string empty with the given operation. In a single operation, you can pick some characters… Read More »
Given a string str. The task is to modify the string by swapping two adjacent characters if both of them are vowels or both of… Read More »
Given a string in the form of an equation i.e A + B + C – D = E where A, B, C, D and… Read More »
Given a string . The task is to find the lexicographically largest subsequence of the string which is a palindrome. Examples: Input : str =… Read More »
Given a binary string str consisting of characters ‘0’ and ‘1’. The task is to find whether the string is valid or not. A string… Read More »