We will discuss an easy approach to generate all the rotations of a string. Approach is simple we will concatenate the given string with itself and then we will be able to generate all the rotations. C++ Program to generate all the rotations of a given string is given below along with its algorithm.
C++ Program to reverse the vowels of a string is given below. Approach is simple, we will use two pointer approach. First we will initialize a counter at the start of the string and the other one is at the end of the string. Time complexity of the program given below is O(n) and space complexity is O(1).
Python Program to calculate the frequency of the character of the given string is given below. In this Program we used python dictionaries where key is the character of string and its value is the occurrence of that character in the given string.
C Program to convert infix expression into postfix expression along with algorithm is given below. Conversion of Infix expression to postfix expression is a classical example of use of Data Structure Stack.
Two strings are said to be anagram is one string can be formed by rearranging the characters of the second string and vice versa. C++ Program is given below to check is two strings are anagram are not.
C++ Program to find the first repeated character in the string is given below. In this i used and unordered_map to store the count of the every character of the string..