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

Method removeFirst

12_LinkedList.java/LinkedList.java:70–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 public int removeFirst() {
71 if(size == 0) {
72 System.out.println("LL is empty");
73 return Integer.MIN_VALUE;
74 } else if(size == 1) {
75 int val = head.data;
76 head = tail = null;
77 size = 0;
78 return val;
79 }
80 int val = head.data;
81 head = head.next;
82 size--;
83 return val;
84 }
85
86 public int removeLast() {
87 if(size == 0) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected