@@ -0,0 +1,1047 @@
+package com.sunny.grokkingalgorithms.gfg.ylee;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashSet;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0A/**%0A * Created by sundas on 4/18/2018.%0A */%0Apublic class FindVowelsInASentence %7B%0A%0A%0A  /**%0A   *%0A   * @param sentence%0A   * @return%0A   */%0A  public static List%3CString%3E findVowelsInASentence(String sentence)%7B%0A    List%3CString%3E wordsWithFirstLetterAsVowels = new ArrayList%3C%3E();%0A    String%5B%5D splitted = sentence.split(%22 %22);%0A    Set%3CCharacter%3E vowels = new HashSet%3C%3E();%0A    vowels.add('a');%0A    vowels.add('e');%0A    vowels.add('i');%0A    vowels.add('o');%0A    vowels.add('u');%0A    for(String word: splitted)%7B%0A      if(vowels.contains(Character.toLowerCase(word.charAt(0))))%7B%0A        wordsWithFirstLetterAsVowels.add(word);%0A      %7D%0A    %7D%0A    return wordsWithFirstLetterAsVowels;%0A  %7D%0A%0A  /**%0A   *%0A   * @param args%0A   */%0A  public static void main(String%5B%5D args) %7B%0A    String sentence = %22Brown cat jumped over the fence and then jumped backe in again.%22;%0A    System.out.println(findVowelsInASentence(sentence));%0A  %7D%0A%7D%0A

Find words in a sentence that start with a vowel.