public static <T> boolean is_linked_list_a_palindrome(node_t<T> L) {
    // Find the middle point of L if L is odd length,
    // and right-middle point if L is even length.
    node_t<T> slow = L, fast = L;
    while (fast != null) {
      fast = fast.next;
      if (fast != null) {
        fast = fast.next; slow = slow.next;
      }
    }

    // Compare the first half and reversed second half lists.
    node_t<T> reverse =
            ReverseLinkedListIterativeTemplate.reverse_linked_list(slow);
    while (reverse != null && L != null) {
      if (reverse.data != L.data) {
        return false;
      }
      reverse = reverse.next; L = L.next;
    }
    return true;
  }