Wayfair interview question

generate palindrome using recursion