Given a string str, the task is to make a perfect right-angled triangle by printing the characters of the string. Input: str = “GEEKSFORGEEKS”Output :G E… Read More
Category Archives: Strings
Given two strings, word1, and word2, where each string has a 0-based index. A move is defined as selecting two indices, i and j, such… Read More
Given a string str and an array of strings dictionary[], the task is to find the number of ways str can be formed as a… Read More
Given a string S of length N containing only lowercase alphabets, also given a permutation P of length N containing integers from 0 to N-1.… Read More
Given a string X of length N and an integer K, the task is to determine if there exists a string (say Y) of length… Read More
In Data Structures and Algorithms (DSA), a String can also be defined as a sequence of characters, stored in contiguous memory locations, terminated by a… Read More
Given a string str representing a direct connection between arr[i] and arr[i+1] in the given string, the task is to minimize the string by finding… Read More
Given array A[] of strings of size N, the task for this problem is to print the Maximum Common prefix of string ‘i’ with other… Read More
Given a String test_str as localhost API Request Address, the task is to get the extract port number of the service. Examples: Input: test_str =… Read More
Given a string S of length l, the task is to count the number of pairs of two non-overlapping substrings of length K of the… Read More
Given a string S and a set of strings D, the task is to find the minimum number of deletions required to make the string… Read More
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