Company: Airtel_24sep
Difficulty: medium
Minimum Cost String Problem Description You are given a string str. The string consists of lower case Latin letters ('a'-'z'). You have to convert all the characters of the string such that all the characters become equal and they should be a vowel, the following characters are vowels 'a', 'e', 'i', 'o', 'u'. The cost of changing a consonant into any vowel is 10 dollars. Let, X and Y are two vowels then the cost of converting X into Y will be |X-Y| dollars. Your task is to find and print the minimum cost to transform the string into the desired string. If the string is already equal to the desired string print -1, otherwise print the minimum cost. Input Format: The input consists of a single line. The line contains a string str. The input will be read from the STDIN by the candidate Output Format: Print a number that represents the minimum cost to transform the string into the desired string if the string is already equal to the desired string then print -1. The output will be matched