Please answer both of the questions. Java is the language I am learning.
14)
Stacks:
Given a stack named st, and the following operations, in what order are the values printed?
st.push(13)
st.push(2)
x = st.pop()
print x
x = st.pop()
print(x)
x = st.pop()
print(x)
st.push(10)
st.push(44)
x = st.pop()
print(x)
b) How can we represent a stack in a computer program if we don't use any built-in classes and we don't use a linked list? Make sure the answer is complete.