Tag Archives: strings

Given a binary string S of length N (1 ≤ N ≤ 105), the task is to print a permutation A consisting of integers 0… Read More
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… Read More
Given a Binary string str of length N, the task is to find the last character removed from the string by repeatedly removing the first… Read More
Given a string str of length N, the task is to print all possible non-empty subsequences of the given string such that the subsequences either… Read More
Given string str consisting of lowercase alphabets, the task is to find the maximum repeating character obtained for every character of the string. If for… Read More
Given a string str of length N and a substring pattern of length M, the task is to find the frequency of occurrences of pattern… Read More
Given a string, str, the task is to find the indices of the given string such that the count of lexicographically smaller characters on the… Read More
Given a binary array, in which, moving an element from index i to index j requires abs(i – j) cost. The task is to find… Read More
Given string str of length N, the task is to check if the given string contains only special characters or not. If the string contains… Read More
Given two strings str1 and str2, each of length N and consisting of lowercase English alphabets only, the task is to check if string str1… Read More
Given a number num and String str, the task is to generate the new String by extracting the character from the string by using the… Read More
Given a string S of length N consisting of lowercase alphabets, the task is to find the minimum number of operations to convert the given… Read More
Given two strings S1 of size N and S2 of size M, the task is to find the lexicographically smallest and the largest anagrams of… Read More
Given string str of lowercase alphabets and an array cost[], where cost[i] represents the cost of deletion of ith character in the given string. The… Read More
Given an array of strings arr[] where each string is of the form “name:number” and a character T as input, the task is to generate… Read More