<commit_before># 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

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<commit_msg>Create fast node that is twice the speed of slow node to get to center of list<commit_after># 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

	fake_head = Node(None)
	fake_head.next = l
	fast_node = fake_head
	slow_node = fake_head

	while fast_node.next and fast_node.next.next:
		fast_node = fast_node.next.next
		slow_node = slow_node.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]))
{'fraction_non_alphanumeric': 0.0861513687600644, 'fraction_numerical': 0.004830917874396135, 'mean_word_length': 4.334763948497854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3290249', 'n_tokens_mistral': 447, 'n_tokens_neox': 422, 'n_words': 139}