Computer Science, asked by saYanOP, 7 months ago

Write a program in Java to input the names of 10 cities in a Single Dimensional Array. Display only those names which begin with a vowel and ends with a vowel

Answers

Answered by Ayushbhat
0

Answer:

Step 1: Iterate over the entire String

Step 2: check if the ith character for vowel

Step 3: If true iterate the string from the end,

if false move to next iteration

Step 4: check the jth character for consonent

if false move to next iteration

if true perform the following

Step 5: Add the substring starting at index i and

ending at index j to the hastset.

Step 6: Iterate over the substring drop each character

and recur to generate all its subString

Similar questions