# Category Archives: Strings

Given a string S containing lowercase English alphabets, and a matrix shift[][] consisting of pairs of the form{direction, amount}, where the direction can be 0… Read More
Given string str of length N and a character X, where N is always of the form 2k, the task is to find the minimum… Read More
Given a string str of N characters, the task is to calculate the count of valid unordered pairs of (i, j) such that the string… Read More
Given a string S of length N, and a range [L, R] (1 <= L, R <= N). The task is to find the length… Read More
Given a number N, the task is to find the total number of balanced binary strings possible of length N. A binary string is said… Read More
Given a string str[] of N lower case English alphabets, the task is to check if there exists a substring of the given string such… Read More
Given a string S of lowercase alphabets and an integer K, the task is to find whether there exists a substring of length K having… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome. Before we go… Read More
Given numeric string str, the task is to find the minimum operations needed to make the string palindrome. An operation is defined as:  Select one… Read More
Given string str of size N, the task is to print the characters of string whose frequency is a power of K in a lexicographically… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 4.  Examples:  Input: 8 Output: 1 Input:… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 4.  Examples:  Input: 8 Output: 1 Input:… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 4.  Examples:  Input: 8 Output: 1 Input:… Read More