add print content

pull/3/head
左程云 5 years ago
parent d50be0e7d6
commit 54b50803be

@ -117,11 +117,18 @@ public class Code04_CopyListWithRandom {
head.next.next.next.next.rand = null; // 5 -> null
head.next.next.next.next.next.rand = head.next.next.next; // 6 -> 4
System.out.println("原始链表:");
printRandLinkedList(head);
System.out.println("=========================");
res1 = copyListWithRand1(head);
System.out.println("方法一的拷贝链表:");
printRandLinkedList(res1);
System.out.println("=========================");
res2 = copyListWithRand2(head);
System.out.println("方法二的拷贝链表:");
printRandLinkedList(res2);
System.out.println("=========================");
System.out.println("经历方法二拷贝之后的原始链表:");
printRandLinkedList(head);
System.out.println("=========================");

Loading…
Cancel
Save