Write a recursive method to reverse a string. Explain why you would not normally use recursion to solve this problem.
What will be an ideal response?
```
public String reverse (String text)
{
String result = text;
if (text.length() > 1)
result = text.charAt(text.length()-1)
+ reverse (text.substring(0, text.length()-1));
return result;
}
```
Computer Science & Information Technology
You might also like to view...
Use the results in part (a) to compute the confidence for the association rules {b, d} ?? {e} and {e} ?? {b, d}. Is confidence a symmetric measure?
Consider the data set shown in Table 6.1.
Computer Science & Information Technology
With the Free Transform Tool, SHIFT+DRAG to rotate the object in ____-degree increments.
a. 12.5 b. 25 c. 45 d. 90
Computer Science & Information Technology