Leetcode Design Hashmap Python Code For Palindrome