An Array-Based Stack (contd.) • Pseudo-Code (contd.) Algorithm push(o): if size() = N then throw a StackFullException t ← t 1 S[t] ← o Algorithm pop(): if isEmpty() then throw a StackEmptyException e←S[t] S[t]←null t←t-1 return e - Study24x7
Social learning Network
16 Mar 2019 10:29 AM study24x7 study24x7

An Array-Based Stack (contd.) • Pseudo-Code (contd.) Algorithm push(o): if size() = N then throw a StackFullException t ← t + 1 S[t] ← o Algorithm pop(): if isEmpty() then throw a StackEmptyException e←S[t] S[t]←null t←t-1 return e

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles