Company: Deloitte_1july

Difficulty: medium

Problem Statement

Write a program that takes a list of words as input and sort the list of words in alphabetical ascending order. Identify words in the sorted list that start with a vowel (a, e, i, o, u) regardless of their case. Display each of the words along with the position in the sorted list. Read the input from STDIN and write the output to STDOUT. You should not write arbitrary things while reading the input and while printing as these contribute to the standard output. Constraints: i) There is at least 1 word in the given list that starts with vowels. ii) If there is no word starting with vowel then print 0 as output. Input Format: The first line of input contains a list of words with each separated by a space. Output Format: The list of words and their position both be separated by a single white space and each word should be printed in separate line. If no word in the list starts with vowel then print 0 as output. Sample Input 1: only god can judge me now Sample Output 1: only 6 Explanation 1

More Deloitte_1july OA questionsInterview experiences