Given a word of length less than 10, the task is to find a number of ways in which it can be arranged without changing the relative position of vowel and consonants.
Input: "GEEKS" Output: 6 Input: "COMPUTER" Output: 720
- Count the vowels and consonants in the word
- Now find total number of ways to arrange vowel only
- Then find ways to arrange consonant only.
- Multiply both answer to get the Total ways = (no of ways to arrange vowel only)*(no of ways to arrange consonant only)
Below is the implementation of the above approach:
- Substrings starting with vowel and ending with consonants and vice versa
- Count strings with consonants and vowels at alternate position
- Reorder the position of the words in alphabetical order
- Replace consonants with next immediate consonants alphabetically in a String
- Check if the given string of words can be formed from words present in the dictionary
- Count words that appear exactly two times in an array of words
- Alternate vowel and consonant string
- Count of adjacent Vowel Consonant Pairs
- Program to find if a character is vowel or Consonant
- Lexicographically first alternate vowel and consonant string
- Print the last occurrence of elements in array in relative order
- Python program to check if given string is vowel Palindrome
- Print all Subsequences of String which Start with Vowel and End with Consonant.
- Count the nodes of the tree whose weighted string contains a vowel
- Find the arrangement of queue at given time
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.