head, one node per bead.
Return True if the digits read the same from the start and from the end of the string, and False otherwise.
Copying the values into an array is the easy way; try to use only O(1) extra memory.head=list_node([4, 7, 1, 7, 4]) → True
The beads read the same from either end: 4, 7, 1, 7, 4.
head=list_node([3, 3, 5]) → False
Left to right it is 3, 3, 5; right to left it is 5, 3, 3. Not symmetric.
head=list_node([8]) → True
head=list_node([4, 7, 1, 7, 4])
True
Run checks the first 3 tests in your browser. Submit checks all 83 tests on the server, hidden ones included.