Given string str consisting of lowercase alphabets, the task is to find the maximum repeating character obtained for every character of the string. If for… Read More
Tag Archives: strings
Given a string str of length N and a substring pattern of length M, the task is to find the frequency of occurrences of pattern… Read More
Given a string, str, the task is to find the indices of the given string such that the count of lexicographically smaller characters on the… Read More
Given a binary array, in which, moving an element from index i to index j requires abs(i – j) cost. The task is to find… Read More
Given string str of length N, the task is to check if the given string contains only special characters or not. If the string contains… Read More
Given two strings str1 and str2, each of length N and consisting of lowercase English alphabets only, the task is to check if string str1… Read More
Given a number num and String str, the task is to generate the new String by extracting the character from the string by using the… Read More
Given a string S of length N consisting of lowercase alphabets, the task is to find the minimum number of operations to convert the given… Read More
Given two strings S1 of size N and S2 of size M, the task is to find the lexicographically smallest and the largest anagrams of… Read More
Content has been removed on Author’s request. Recommended Solve DSA problems on GfG Practice. Solve Problems My Personal Notes arrow_drop_up Save
Given an array of strings arr[] where each string is of the form “name:number” and a character T as input, the task is to generate… Read More
Given a string str and a positive integer k, the task is to write a Java program to print the first k characters of the… Read More
Given string str, the task is to print the middle character of a string. If the length of the string is even, then there would… Read More
Given string str, the task is to write a Java program to swap the first and the last character of the given string and print… Read More
Given string str, the task is to write Java Program to remove the first and the last character of the string and print the modified… Read More