Microsoft interview question

What is stack?

Interview Answers

Anonymous

Feb 19, 2012

Stack is FILO, first in last out!

2

Anonymous

Dec 12, 2011

A stack is an abstract data structure with a philosophy FIFO (First input, first output). The fundamental methods with this ADT are: peek(): to get the top of the stack without removing it. void pop(): to get the top of the stack removing it. push(void n): to put an element on the top of the stack. bool empty(): to check if the stack does not have any element.