Tagged: data structure

Find Longest Palindromic Substring – SET 1

“Find Longest Palindromic Substring” is an important and one of the interview favourite problem of string data structure. Here, we are given a string and our task is to write a program to find the longest palindromic substring in the given string.  Longest Palindromic Substring: Longest Palindromic Substring of the given string...

Print All Substrings of a String

“Print all substrings of a String” is a popular technical interview problem asked in many interviews. Here, we are given a string of length ‘n’ and our task is write a program to count and print all substrings of a string.  Example: INPUT: ABCD OUTPUT: No of substring: 10 Substrings:...

Reverse Each Word in a String

“Reverse Each Word in a String” is a popular problem of string data structure. Here, we are given a string of words and our task is to write a program to reverse each word in a string. Example: INPUT: HelpMeStudyBro is an Emerging Website OUTPUT: orBydutSeMpleH si na gnigremE etisbeW ...

blank

Check Isogram String or Not

“Check Isogram String or Not” is a basic problem of string data structure. Here, we are given a string of alphabets only and our task is to write a program to check whether the string is isogram or not.  An isogram string is a string in which every character occurs...

blank

Remove All Blank Spaces in a String

“Remove All Blank Spaces in a String” is  again a basic problem of string data structure. Here, we are given a string of length ‘n’ and our task is to remove the blank spaces from the string. Example: INPUT: Help Me Study Bro OUTPUT: HelpMeStudyBro The steps required to Remove All...

blank

Find most Frequent Character in String

“Find most Frequent Character in String” is a problem of string data structure. Here, we are given a string of length ‘n’ and our task is to write a program to find the most frequent character of the string.  If there are more than one character which have same highest...

blank

Find Smallest and Largest Word in String

“Find Smallest and Largest Word in String” is again a basic problem of string data structure. Here, we are given a string containing some words and our task is to write a program to find smallest and largest word in string. Example: INPUT: Help Me Study Bro OUTPUT: Smallest Word:...

blank

Count Number of Words in a String

“Count Number of Words in a String” is a basic problem of string data structure. Here, we are given string containing some words and our task is to write a program to count the number of words present in the given string and print the count. Example: INPUT:  Help Me...

blank

Convert Lowercase to Uppercase and Vice Versa

“convert lowercase to uppercase and vice versa” is a basic problem of string data structure. Here, we are given a string of length ‘n’ and our task is to convert upper-case alphabets to lower-case and vice-versa. String might contain characters except alphabets too, in that case, we will ignore them. Example:...

blank

Check Whether String is Palindrome or not

“Check Whether String is Palindrome or not” is a very popular and basic problem of string data structure. Here, we are given a string of length ‘n’ and our task is to write a program to check whether given string is palindrome string or not. A palindromic string is a...