Terarecon interview question

Standard 2sum and IsPalindrome from Leetcode