What Is Stack In Data Structure?


7 Answers

Rishika singh Profile
Rishika singh answered
In computer science, a stack is a last in, first out(LIFO) abstractdata type and data structure. A stack
can have any abstractdata type as an element, but is
characterized by only two fundamental operations, the push and the
pop. The push operation adds to the top of the list, hiding any items
already on the stack, or initializing the stack if it is empty. The pop
operation removes an item from the top of the list, and returns this value to
the caller. A pop either reveals previously concealed items, or results in an
empty list.
A stack is a restricted data structure, because only a small number of
operations are performed on it. The nature of the pop and push operations also
means that stack elements have a natural order. Elements are removed from the
stack in the reverse order to the order of their addition: Therefore, the lower
elements are typically those that have been in the list the longest...... Hope you get your ans
himanshi sharma Profile
himanshi sharma answered
Stack is last in first out(lifo) i.e. In which insertion & deletion take place only from one side (at the top). Insert the element in stack in called push & deletetion is called pop
Anonymous Profile
Anonymous answered
Stack is an LIFO(last in , first out) data type or data structure.a stack is an restricted data type because a small number of operation are performed in it.and it use pop and push operation.
Anonymous Profile
Anonymous answered
Stack is a linear list of element

Answer Question