Advertisement
vmeansdev

StackLinkedList

Sep 12th, 2019
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Stack<T> {
  4.  
  5.     private LinkedList<T> store;
  6.  
  7.     public Stack() {
  8.        
  9.         store = new LinkedList<>();
  10.     }
  11.  
  12.     public int size() {
  13.         return 0;
  14.     }
  15.  
  16.     public T pop() {
  17.         // write your code here
  18.         return null;
  19.     }
  20.  
  21.     public void push(T val) {
  22.         // write your code here
  23.     }
  24.  
  25.     public T peek() {
  26.         // write your code here
  27.         return null;
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement