MCPcopy Index your code
hub / github.com/careercup/ctci / main

Method main

java/Chapter 2/Question2_1/Question.java:75–90  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

73 }
74
75 public static void main(String[] args) {
76 LinkedListNode first = new LinkedListNode(0, null, null); //AssortedMethods.randomLinkedList(1000, 0, 2);
77 LinkedListNode head = first;
78 LinkedListNode second = first;
79 for (int i = 1; i < 8; i++) {
80 second = new LinkedListNode(i % 2, null, null);
81 first.setNext(second);
82 second.setPrevious(first);
83 first = second;
84 }
85 System.out.println(head.printForward());
86 LinkedListNode clone = head.clone();
87 deleteDupsA(head);
88 System.out.println(head.printForward());
89 deleteDupsC(clone);
90 }
91}

Callers

nothing calls this directly

Calls 6

setNextMethod · 0.95
setPreviousMethod · 0.95
printForwardMethod · 0.95
cloneMethod · 0.95
deleteDupsAMethod · 0.95
deleteDupsCMethod · 0.95

Tested by

no test coverage detected