Question: Write a recursive method to test a string to determine if it is word symmetric. Signature: public static boolean isWordSymmetric(String[] words, int start, int end)
Write a recursive method to test a string to determine if it is word symmetric.
Signature: public static boolean isWordSymmetric(String[] words, int start, int end)
Description: Similar to a palindrome, a phrase is symmetric if the words placed forward or backwards say the same thing. For example, "Fall leaves as soon as leaves fall" is word symmetric.
Write a recursive method that determines if the phrase is word symmetric. To solve this, you'll need to split it into the individual words before calling the recursive method. Inside the recursive method be sure to do the word comparison while ignoring the case of the string.
Please note that the end argument represents the last array index to check.
IsWordSymmetric must be case insensitive
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
