@Test public void shouldAcceptLinkedListWithJustOneElementRecursive() { ListNode<Integer> head = new ListNode<Integer>(1); assertEquals(head, reverseLinkedList.reverseRecursive(head)); }
public ListNode<Integer> reverseRecursive(ListNode list) { validateInput(list); return reverseRecursiveInner(list); }
ReverseLinkedList { public ListNode<Integer> reverseRecursive(ListNode list) { validateInput(list); return reverseRecursiveInner(list); } }
ReverseLinkedList { public ListNode<Integer> reverseRecursive(ListNode list) { validateInput(list); return reverseRecursiveInner(list); }  }
ReverseLinkedList { public ListNode<Integer> reverseRecursive(ListNode list) { validateInput(list); return reverseRecursiveInner(list); }  ListNode reverseIterative(ListNode list); ListNode<Integer> reverseRecursive(ListNode list); }
ReverseLinkedList { public ListNode<Integer> reverseRecursive(ListNode list) { validateInput(list); return reverseRecursiveInner(list); }  ListNode reverseIterative(ListNode list); ListNode<Integer> reverseRecursive(ListNode list);  }