3. In a stack,
You can access the element which is entered at last
You can access the element which is entered at beginning
You can access the element from any position
O all the above
Answers
Answer:A stack is a container of objects that are inserted and removed according to the last-in first-out (LIFO) principle
Explanation: In the pushdown stacks only two operations are allowed: push the item into the stack, and pop the item out of the stack.
Answer:
According to the last-in first-out (LIFO) principle, objects are added to and taken out of a stack.
Explanation:
A linear data structure called a stack keeps the operations performed in a specific order. The order could be FILO or LIFO (Last In First Out) (First In Last Out). According to this method, the element that was added last will appear first. As an actual illustration, consider a stack of plates stacked on top of one another. We can claim that the plate we put last comes out first because the plate we put last is on top and we remove the plate at the top. Its primary functions include push(), pop(), top(), isEmpty(), size(), and others. Certain actions are made available to us so that we can manipulate a stack.
Hence , According to the last-in first-out (LIFO) principle, objects are added to and taken out of a stack.
#SPJ3