Given a positive integer N, the task is to find the number of alphanumeric palindromic strings of length N. Since the count of such strings… Read More

# Category Archives: Strings

Given a string S of length N consisting of ‘x’ and ‘.’. The given string represents a row of seats where ‘x’ and ‘.’ represent… Read More

Given two strings S1 and S2, the task is to check if it’s possible to generate string S2 by repeatedly appending subsequences of S1 to… Read More

Given an integer N, a binary string S and an array W[]. S denotes the sequence of N * 2 persons entering the hall, where… Read More

Given two strings, str1 and str2 consisting of N lowercase alphabets, the task is to find the minimum count of operations of the following two… Read More

Given a string S consisting of lowercase alphabets, the task is to find the lexicographically smallest string that can be obtained by removing duplicates from… Read More

Given a numerical string S of length N, the task is to find the length of the longest substring of S where each element occurs… Read More

Given string str consisting of lowercase letters, the task is to find the minimum number of characters to be deleted from the given string such… Read More

Given numerical string str consisting of N integers, the task is to find the sum of all possible resulting strings after removing non-empty substrings. Examples:… Read More

Given a string S of valid parentheses “(“ and “)”, the task is to print the string obtained by removing the outermost parentheses of every… Read More

Given a binary string S of length N, the task is to check if the decimal representation of the binary string is divisible by 9… Read More

Given an array of strings arr[] representing the change folder operations(Unix-style) performed on the file system. Initially, the file system opens in the main folder.… Read More

Given an array of strings arr[], the task is to count the number of distinct strings that can be generated from the given array by… Read More

Given an integer N, the task is to print output of the given integer in international place value format and put commas at the appropriate… Read More

Given a string str and a character ch, where the button of character ch is not working correctly. After pressing that key, it toggles the… Read More