Question: Write a recursive function is_reverse that accepts two strings as a parameter and returns true if the two strings contain the same sequence of characters

Write a recursive function is_reverse that accepts two strings as a parameter and returns true if the two strings contain the same sequence of characters as each other but in the opposite order, and false otherwise. The function is case-insensitive (ignoring capitalization). The string could contain characters other than letters, such as numbers, spaces, or other punctuation; you should treat these like any other character. The table below shows some expected outputs for the different method calls

Write a recursive function is_reverse that accepts two strings as a parameter

You are not allowed to construct any structured objects other than strings (no list, dictionary, etc.) and you may not use any loops to solve this problem; you must use recursion.

\begin{tabular}{|l|c|} \hline \multicolumn{1}{|c|}{ Call } & Value Returned \\ \hline is_reverse("CS320", "023sC") & true \\ \hline is_reverse("Madam", "MaDAm") & true \\ \hline is_reverse("Q", "Q") & true \\ \hline is_reverse("", "") & true \\ \hline is_reverse("e via n", "NaIv E") & true \\ \hline is_reverse("Go! Go", "OG !OG") & true \\ \hline is_reverse("Obama", "McCain") & false \\ \hline is_reverse("banana", "nanaba") & false \\ \hline is_reverse("hello!!", "olleh") & false \\ \hline is_reverse("', " x ") & false \\ \hline is_reverse("madam I", "i madam") & false \\ \hline is_reverse("ok", "oko") & false \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!