MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / isVowel

Method isVowel

CountVowelsStringInRanges.java:23–31  ·  view source on GitHub ↗
(String word)

Source from the content-addressed store, hash-verified

21 }
22
23 public int isVowel(String word){
24 HashSet<Character> set = new HashSet<>(Arrays.asList('a','e','i','o','u'));
25 char first = word.charAt(0);
26 char last = word.charAt(word.length()-1);
27 if(set.contains(first) && set.contains(last)){
28 return 1;
29 }
30 return 0;
31 }
32}

Callers 1

vowelStringsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected