Skip to content

Category Archives: Strings

Given a string str and a positive integer K. In an operation, you can select a character from the first K characters and move it… Read More
Given a string str and an integer N, the task is to print all possible sub-strings of length N. Examples: Input: str = “geeksforgeeks”, N… Read More
Given a string S, the task is to print all the substrings of a string that has an equal number of vowels and consonants. Examples:… Read More
Given a string str, the task is to find the number of ways two non-overlapping substrings of length N can be selected out of a… Read More
Given a string Str, the task is to extract all the present dates from the string. Dates can be in the format i.e., mentioned below:… Read More
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

Start Your Coding Journey Now!