public static <T> node_t<T> even_odd_merge(node_t<T> L) {
    node_t<T> odd = (L != null) ? L.next : null;
    node_t<T> odd_curr = odd;
    node_t<T> pre_even_curr = null, even_curr = L;

    while (even_curr != null && odd_curr != null) {
      even_curr.next = odd_curr.next;
      pre_even_curr = even_curr;
      even_curr = even_curr.next;
      if (even_curr != null) {
        odd_curr.next = even_curr.next;
        odd_curr = odd_curr.next;
      }
    }

    // Odd number of nodes.
    if (even_curr != null) {
      pre_even_curr = even_curr;
    }
    // Prevents empty list.
    if (pre_even_curr != null) {
      pre_even_curr.next = odd;
    }
    return L;
  }