Easy Python Solution | 100% Fast
Code\n\nclass Solution:\n    def minimumCost(self, nums: List[int]) -> int:\n        # Check palindrome:\n        def is_palindrome(num: int):\n            num 
# Code\n```\nclass Solution:\n    def minimumCost(self, nums: List[int]) -> int:\n        # Check palindrome:\n        def is_palindrome(num: int):\n            num = str(num)\n            return num == num[::-1]\n\n        # Count cost to make Equalindromic Array\n        def get_cost(median):\n            cnt = 0\n            for num in nums:\n                cnt += abs(num-median)\n            return cnt\n\n        # Sort the array\n        nums.sort()\n        n = len(nums)\n\n        # Check median of nums\n        mid_index = n//2\n        if n%2 == 1:\n            median = nums[mid_index]\n        else:\n            median = (nums[mid_index-1] + nums[mid_index])//2\n        \n        # Determine the Condition\n        if is_palindrome(median):\n            return get_cost(median)\n        \n        # If not plaindrome make palindrome\n        # Check both ways increasing and decreasing\n        p_1 = median + 1\n        p_2 = median - 1\n        while not is_palindrome(p_1) or not is_palindrome(p_2):\n            if not is_palindrome(p_1):\n                p_1 += 1\n            if not is_palindrome(p_2):\n                p_2 -= 1\n        return min(get_cost(p_1), get_cost(p_2))\n```
['Python3']