1. Let us say you are given a basic stack data structure with just "core" operations push and pop. Is it possible to implement top using these two operations? Explain. (or) Are the following code segments equivalent? Why?
x = s.top();
x = s.pop();
Yes, they are equivalent. pop() removes the object at the top of this stack and returns that object ...
This job notes basic stack data structure.