| 1 | //stack using Linked List |
| 2 | public class StackDS { |
| 3 | private static class Node { |
| 4 | int data; |
| 5 | Node next; |
| 6 | |
| 7 | Node(int data) { |
| 8 | this.data = data; |
| 9 | next = null; |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | static class Stack { |
| 14 | public static Node head = null; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…