Question: 2. (12 pts) Write a static method that, given a string, returns the input string interleaved with itself in reverse order. The forward string

2. (12 pts) Write a static method that, given a string, returns the input string interleaved with itself in reverse order. The forward string should come first in the output; thus, the output string will be a palindrome that both begins and ends with the first letter of the input string. In code, this means that the character from index i in the input string will always be immediately followed the character from index s.length-i-1. For instance: Cento1ncesc "ISU" becomes "IUSSUI" and "Cyclones" becomes "CsyecnloolnceysC". public static String reverseInterleave (String s) {
Step by Step Solution
There are 3 Steps involved in it
public class PalindromeInterleave public static String reverseInterleaveString s Str... View full answer
Get step-by-step solutions from verified subject matter experts
