Method reverse shown below returns the reverse of a string


Question: Method reverse shown below returns the reverse of a String.

String reverse( String str )

a. Implement reverse recursively. Do not worry about the ineffi- ciency of string concatenation.

b. Implement reverse by having reverse be the driver for a private recursive routine. reverse will create a StringBuffer and pass it to the recursive routine.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Method reverse shown below returns the reverse of a string
Reference No:- TGS02457752

Now Priced at $15 (50% Discount)

Recommended (90%)

Rated (4.3/5)