Arista Networks Interview Question

Palindrome and simple recursion problem