# Category Archives: Strings

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 string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1? (eg given s1 = ABCD… Read More
Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1? (eg given s1 = ABCD… Read More
Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1? (eg given s1 = ABCD… Read More
Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of… Read More
Given a binary string str[] of size N. The task is to find the longest balanced substring. A substring is balanced if it contains an… Read More
Given an array arr[] containing N strings, the task is to find the count of strings which are isograms. A string is an isogram if… Read More
Given an array arr[] containing N strings and an integer K, the task is to find the number of strings which are isograms and at… Read More
Given a string str, the task is to calculate the number of substrings of the given string such that the frequency of each element of… Read More
Given an array arr containing N strings and a string str, the task is to find the number of strings that do not contain any… Read More
Given an array arr[] containing N strings and an integer K, the task is to find the count of strings with the frequency of each… Read More
Given an array arr[] of strings and integers X and Y, the task is to find the count of strings with frequency of each character… Read More
Given two strings S and T, the task is to check if any anagram of string S is lexicographically smaller than any anagram of string… Read More
Given a string str, the task is to find the minimum number of moves required to make str empty by deleting any substring whose starting… Read More