------
## 最终结论
```python
def largest_palindrome(arr, n):
    def is_palindrome(num):
        return str(num) == str(num)[::-1]

    max_palindrome = -1
    for number in arr:
        if is_palindrome(number) and number > max_palindrome:
            max_palindrome = number
            
    return max_palindrome

# Test cases
assert largest_palindrome([1, 232, 54545, 999991], 4) == 54545
assert largest_palindrome([1, 2, 3, 4, 5, 50], 6) == 5
assert largest_palindrome([1, 3, 7, 9, 45], 5) == 9
```