Given a string S representing a sequence of moves(L, R, U, and D) and an integer R representing the radius of a circle whose center… Read More

# Category Archives: Strings

Given a string S of length N representing a boolean expression, the task is to find the minimum number of AND, OR, and NOT gates… Read More

Given a binary string S of size N, the task is to maximize sum of count of consecutive 0s present at the start and end… Read More

Given an array arr[] consisting of N strings where each string represents an email address consisting of English alphabets, ‘.’, ‘+’ and ‘@’, the task… Read More

Given a string S, the task is to find the length of the longest increasing subsequence present in the given string. A sequence of characters… Read More

The first thing that we have to keep in my mind while solving this kind of problem is that the strings are immutable i.e, If… Read More

Given a string S of length N, the task is to print the highest roman number possible by rearranging the characters of the given string,… Read More

Given two binary strings A and B of length N, the task is to convert the string A to B by repeatedly flipping a prefix… Read More

Given two sorted strings S1 and S2 of lengths N and M respectively, the task is to construct lexicographically the smallest string possible by merging… Read More

Given a string S of size N, the task is to sort the string without changing the position of vowels. Examples: Input: S = “geeksforgeeks”Output:… Read More

Given a string keyboardLayout of size 26 representing the sequence of characters present in a single row of a keyboard and a string word, the… Read More

Given two strings S1, S2 of length N and M respectively, and two positive integers N1 and N2, the task is to find the maximum… Read More

Given a string S consisting of N lowercase alphabets, the task is to find the length of the smallest substring in S whose occurrence is… Read More

Given a string S consisting of lowercase English alphabets, the task is to find the number of unique characters present in the string. Examples: Input:… Read More

Given two strings str and X of length N and M respectively, the task is to find the minimum characters required to be removed from… Read More