MCPcopy Index your code
hub / github.com/apna-college/Alpha / push

Method push

13_Stacks/StackLL.java:15–24  ·  view source on GitHub ↗
(int data)

Source from the content-addressed store, hash-verified

13 static class Stack {
14 public static Node head = null;
15 public static void push(int data) {
16 Node newNode = new Node(data);
17
18 if(head == null) {
19 head = newNode;
20 return;
21 }
22 newNode.next = head;
23 head = newNode;
24 }
25
26 public static boolean isEmpty() {
27 return head == null;

Callers 15

mainMethod · 0.95
mainMethod · 0.95
stockSpanMethod · 0.95
mainMethod · 0.95
isValidMethod · 0.95
checkDuplicateMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
isValidMethod · 0.95
isDuplicateMethod · 0.95
maxAreaMethod · 0.95
maxAreaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected