# Category Archives: Strings

Given a number N. Convert N into an Indian currency format. For more understanding, please look into examples. Examples: Input: N = 1000000Output: Rs 10,… Read More
Given a string str of length N and an integer K, the task is to count the number of substrings with even numbers of K.… Read More
Given an array of strings arr[], where each arr[i] represents a single sentence with no leading or trailing spaces. Return the count of the maximum… Read More
Given a string S of length, N. Split them into two strings such that the number of common characters between the two strings is maximized… Read More
Given a string S of length N, the task is to check if a string can be split into two non-intersecting strings such that the… Read More
Bob is very fond of balloons. Once he visited an amusement park with his mother. The mother told Bob that she would buy him a… Read More
Given an array of strings, the task is to print “Yes” if it contains a string that is a prefix of another string otherwise, print… Read More
Given a binary string S of length N along with Y[] of size K. Then you have to perform K number of queries for each… Read More
Given an array, arr[] consisting of N integers and integer K, the task is to count the number of contiguous subarrays where each element is… Read More
Given a string S of length N. Select a Subsequence of character, delete it, and concatenate the remaining part of the String S. Let’s say… Read More
Given a string S of length N and 2 integers X and Y, the task is to find the minimum cost of converting the string… Read More
Given a string S that contains only lowercase alphabets and no special characters except spaces, the task is to find lexicographically adjacent pairs of characters… Read More
Given a string S of length N, find the length of the two longest non-intersecting subsequences in S that are anagrams of each other. Input:… Read More
Given a string, str consists of characters ‘a’, ‘b’ & ‘c’, the task is to check whether string str ends with “abc” or not. If… Read More
Given a string S of length n, for each character S[i], the task is to find the number of palindromic substrings of length K such… Read More