0 votes
by (2 points)
edited

Help Given - line. Write a recursive method that returns a new string in which all the vowels are separated by the symbol & quot; * & quot; with adjacent letters. It is assumed that all the words are composed of letters of the Latin alphabet. String interviewRecursionTest (String line); interviewRecursionTest (& quot; hello & quot;) - & gt; & Quot; h * e * ll * o & quot; interviewRecursionTest (& quot; healo & quot;) - & gt; & Quot; h * e * a * l * o & quot; interviewRecursionTest (& quot; abc & quot;) - & gt; & Quot; a * bc & quot; interviewRecursionTest (& quot; oab & quot;) - & gt; & Quot; o * a * b & quot; Hint please as it is possible to solve this problem, two days I sit I can not think ... I think that maybe there can somehow apply regular expressions, but I can not figure out how to do it rekursiey.Artem Petrenko

13 Answers

0 votes
by (2 points)
edited
Vadim, zadvoenie stars still have to cut
0 votes
by (2 points)
edited
It is readable TK - & quot; recursive method & quot; drops out of sight ...
0 votes
by (2 points)
edited
If the word of 2 letters, then if there is a vowel - Returns a string with an asterisk between bukvamiEsli 3 - also check on vowels and vozvraschaem.Esli more to1. Divide the word into 2 parts. 2. Check the last letter of the first word and the first letter of the second. If one of them is a vowel, it returns a string created from the function call from the first word, stars and call the function from the second word, or the same, only without the asterisks
Welcome to askiry.com, where you can ask questions and receive answers from other members of the community.
...