Given the head of a singly linked list, return true if it is a palindrome (reads the same forward and backward) or false otherwise.
Note: For this problem, linked lists are represented as arrays for simplicity. The function takes the list as an array and returns a boolean.