Beispiel #1
0
 @Override
 public int pop() {
   // TODO Auto-generated method stub
   ListNode temp = head;
   head = head.next;
   return temp.getVal();
 }
Beispiel #2
0
 @Override
 public int peek() {
   // TODO Auto-generated method stub
   return head.getVal();
 }