Given two strings consisting of lowercase alphabets A and B, both of the same length. Each character of both the strings is either a lowercase… Read More
Category Archives: Strings
Given two strings A and B of lowercase English letters of lengths N and M respectively. Check whether the number of distinct characters in both… Read More
Our geek loves to play with strings, Currently, he is trying to reduce the size of a string by recursively removing all the consecutive duplicate… Read More
Given two strings S1 and S2, which consists of uppercase alphabets. Find the shortest string str which consists of # and uppercase letters, where the… Read More
Geek is extremely punctual but today even he is not feeling like doing his homework assignment. He must start doing it immediately in order to… Read More
Given a string s of length N containing only lowercase English letters and an integer K, the task is to find all distinct substrings of… Read More
Given a string of Letters ‘A‘ and ‘B‘, the task is to make a special flip operation exactly once on the given string. Special Flip… Read More
A special compression mechanism can arbitrarily delete 0 or more characters and replace them with the deleted character count.Given two strings, S and T where… Read More
A binary string is a string that only has two characters, usually the numbers 0 and 1, and it represents a series of binary digits.… Read More
Given a 0-indexed based string str of length n consisting of digits, and a positive integer K, the task is to find the prefixes of… Read More
Given a string str, the task is to print a perfect pyramid by printing the characters of the given string. Examples: Input: str = “GEEKSFORGEEKS”Output: … Read More
Given a string str, the task is to print the perfect diamond from the elements of the given string. Examples: Input: str = ” geeksforgeeks”Output:… Read More
Given two strings Encrypted message and a key phrase. The message is encrypted using a key phrase. Find the original message by decrypting the encrypted… Read More
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