public void doIt() { ListNode nodeHead = LLFactory.create(1, new int[] { 2, 3, 4, 5 }); reverseLinkedListProblem.implementation(nodeHead); LLOperations.verify(nodeHead, 0, new int[] { 5, 4, 3, 2, 1 }); }
public void doIt() { ListNode headNode = LLFactory.create(4, new int[] { 5, 1, 9 }); deleteNodeLinkedListProblem.implementation(headNode.next); LLOperations.verify(headNode, 0, new int[] { 4, 1, 9 }); ListNode headSecond = LLFactory.create(0, new int[] { 1 }); deleteNodeLinkedListProblem.implementation(headSecond); LLOperations.verify(headSecond, 0, new int[] { 1 }); ListNode headThird = LLFactory.create(-3, new int[] { 5, -99 }); deleteNodeLinkedListProblem.implementation(headThird); LLOperations.verify(headThird, 0, new int[] { 5, -99 }); }