# Given a singly linked list of integers, determine whether or not it's a palindrome
class Node(object): # define constructor
	def __init__(self, value):
		self.value = value
		self.next = None

def is_list_palindrome(l):
	if not l.value or not l.next.value:
		return True

	# find center of list
	fast = l
	slow = l

	while fast.next and fast.next.next:
		fast = fast.next.next
		slow = slow.next




def create_nodes(l):
	root = Node(-1)
	current_node = root
	for value in l:
		current_node.next = Node(value)
		current_node = current_node.next
	return root.next


is_list_palindrome(create_nodes([1, 2, 3, 4]))

@@ -392,16 +392,311 @@
 w.next%0A%0A
+%09second_head = Node(slow.next.value)%0A%09slow.next = None%0A%0A%09# reverse second part of list%0A%09part_one = second_head%0A%09part_two = part_one.next%0A%0A%09while part_one and part_two:%0A%09%09temp = Node(part_two.next.value)%0A%09%09part_two.next = part_one%0A%09%09part_one = part_two%0A%09%09part_two = temp%0A%0A%09second_head.next = None
 %0A%0A%0Adef c

Reverse second part of list