Apple interview question

What is a stack?

Interview Answer

Anonymous

17 Sept 2020

A stack follows the procedure of "First in, Last out". To create a stack, elements are pushed into a container and to get the values of the stack, pop the stack and the values at the top of the stack will pop out.