Skip to content

Category Archives: Strings

Given a string S of length, N. Find the maximum length of any substring of S such that, the bitwise OR of all the characters… Read More
Given an array arr[] containing N substrings consisting of lowercase English letters, the task is to return the minimum length string that contains all given… Read More
Given a string S and an array arr[] of words, the task is to return the number of words from the array which is a… Read More
Given a cyclic connected String S (Cyclic string means start and end are connected with each other) containing characters only ‘R’ and ‘G’. the task… Read More
Given a binary string (containing 1’s and 0’s), write a program to count the number of 0’s in a given string such that the following… 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 string B, the task is to find the minimum length prefix of the string which, when removed and added to the end of… Read More
Given a string str and an integer K, the task is to find the longest string that can be made by deleting letters from the… Read More
Given a string s of length N consisting of digits from 0 to 9. Find the lexicographically minimum sequence that can be obtained from given… Read More
Given a string S of length N where (N ≥ 1). The task is to check whether by removing at most one character from the… Read More
Given a string str, find the length of the longest substring without repeating characters.  For “ABDEFGABEF”, the longest substring are “BDEFGA” and “DEFGAB”, with length… Read More
Given an array of strings S with the size of N where each string contains at least two distinct characters. The task is to find… Read More
Given a string S of length N is said to be an Anti-palindrome string if, for each 0 ≤ i ≤ N-1, Si  != S(N… Read More
Given a number N and string S, count the number of ways to create a binary string (containing only ‘0’ and ‘1’) of size N… Read More
Given a string S, The task is to find the longest substring which is a palindrome using hashing in O(N log N) time.  Input: S:… Read More

Start Your Coding Journey Now!