#Put the value at the top of the data:push(n)
#n is the value to enter
#Remove + display value from top of data:pop()
push(5)
push(6)
pop()
>>6
#empty to pop()When you try'stuck underflow'An error will occur
Push above the upper limit(n)When you try'stuck overflow'An error will occur.
push(7)
pop()
pop()
>>stuck underflow
#You can use peek to display the value from the top without deleting it.
push(5)
peek()
>>5
Recommended Posts