![]() |
VOOZH | about |
Given a string which contains lowercase English alphabets. The task is to replace each consonant with the next immediate consonant that comes in English alphabets.
Let's say we have to replace character , it will be replaced by . Another example, let's say we have to replace character , the next immediate consonant is , hence will be replaced by .
Note: If the character is 'z', then look circularly in English alphabets for the next consonant, i.e. replace it with 'b'.
Examples:
Input : str = "geeksforgeeks" Output : heeltgosheelt Input : str = "gfg" Output : hgh
Approach:
Below is the implementation of the above program:
heeltgosheelt
Complexity Analysis: