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

Method removeFirst

12_LinkedList.java/LL.java:66–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

removeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected