Advertisement
bolo17

DemoStack1 - CS - Program

Jun 7th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. DemoStack1 - CS - Program
  2. // other way is to maintain a supporting stack with the top element the lowest
  3. DemoStack1 stack = new DemoStack1();
  4. stack.push(40);
  5. stack.push(30);
  6. stack.push(20);
  7. System.out.println("output = "+stack.arr1[stack.top1]);
  8.  
  9.  
  10. }
  11.  
  12. }
  13.  
  14. class DemoStack1
  15. {
  16. int MAXLEN = 9;
  17.  
  18. int arr[] = new int[MAXLEN];
  19. int arr1[] = new int[MAXLEN];
  20. get link:https://ouo.io/zCy5ZE
  21. download link:https://ouo.io/STB5n3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement