go to previous page   go to home page   go to next page

Answer:

By doing the same thing with the tail (of course).


Recursive Definition of Reverse

Here is that idea, expressed in a recursive definition:

  1. The reverse of "" is "" .
  2. The reverse of "Xtail" is the reverse of "tail" followed by "X"
    • Here, X means any single character,
    • and tail means the tail of the string.

QUESTION 12:

The reverse of "X" is "X". Does the above definition handle this?


go to previous page   go to home page   go to next page