Skip to content

Tag Archives: strings

Given a string S, the task is to find the string which is lexicographically smallest and not a subsequence of the given string S.  Examples:… Read More
Given an array of strings, words[] of size M and a string target of size N. The task is to find the minimum number of… Read More
String data type makes a very important part of any programming language. Rust handles strings a bit differently from other languages.   The String data… Read More
Given two strings S1 and S2, representing sentences, the task is to print both sentences after removing all words which are present in both sentences.… Read More
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