MCPcopy Create free account
hub / github.com/apna-college/Alpha / removeFirst

Method removeFirst

12_LinkedList.java/DLL.java:40–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 }
39
40 public int removeFirst() {
41 if(head == null) {
42 return Integer.MIN_VALUE;
43 }
44 size--;
45 if(head == tail) {
46 int val = head.data;
47 head = tail = null;
48 return val;
49 }
50 int val = head.data;
51 head = head.next;
52 head.prev = null;
53 return val;
54 }
55
56 public void reverse() {
57 Node curr = head;

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected