Skip to content

Category Archives: Strings

Given a string S consisting of N lowercase alphabets, the task is to count the number of substrings whose frequency of each character is even.… Read More
Given an array arr[] consisting of N binary strings, and two integers A and B, the task is to find the length of the longest… Read More
Given a string S consisting of N characters, the task is to find the length of all prefixes of the given string S that are… Read More
Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least… Read More
Given an array arr[] consisting of N strings, the task is to find the pair of strings that is not present in the array formed… Read More
Given a string S consisting of N alphabets and two positive integers L and U, representing the cost of converting any character to lowercase and… Read More
Given an array arr[] consisting of N strings, the task is to sort the array in ascending order after modifying each string by removing all… Read More
Given a string S consisting of N lowercase alphabets and an array of pairs of characters P[][2], the task is to modify the given string… Read More
Given a string S of size N consisting of only ‘(‘ and ‘)’ only and a positive integer K, the task is to check if… Read More
Given a string S of length N, consisting of lowercase characters containing reordered English representations of digits [0 – 9], the task is to print… Read More
Given a string S, the task is to find all the substrings in the string S which is an anagram of another different substring in… Read More
Given three strings S, S1, and S2, the task is to check if the number of substrings that start and end with S1 and S2… Read More
Given a binary string S of size N, the task is to check if the binary string S can be sorted in decreasing order by… Read More
Given an array arr[] consisting of N binary strings, and two integers A and B, the task is to find the length of the longest… Read More
Given an array arr[] consisting of N strings, the task is to find the maximum product of length of the strings arr[i] and arr[j] for… Read More