Arista Networks interview question

Implement palindrome checker and explain it