Yes. All object on a stack must be of the same type. However, the type may be a base class in which case all objects on the stack must either be of that type or be derived from that type. That is, if a circle, triangle and rectangle class are all derived from a common shape class, a stack of shapes would allow instances of all four types because they are all a type of shape.
No.
yes
No. A stack is a LIFO (Last In First Out) data structure.A queue is a FIFO (First In First Out) data structure.
stack is a linear data structure in which data item is either inserted or deleted at one end there are mainly two operations performed on stack.they're push poppush:writing a value to the stack is push or moving the stack pointer up to accomodatethe new item. pop:reading a value from stack or moving the stack pointer down.
Explain The merits of using a deque to implement a stack in data structure
no answer
stack data structure.
A stack is a linear data structure that follows the Last In, First Out (LIFO) principle, where elements are added and removed from the same end called the top. Elements can only be added or removed from the top of the stack, making it a simple and efficient data structure for storing and accessing data.
A stack is a data structure in which last item inserted is taken out first . That's why they are known as LIFO (last in first out). Inserting an item in stack is termed as push and taking an item out from stack I s termed as pop. Stack pointer is the pointer that points to the top of the stack or that points the item at the top of the stack and help in adding or deleting the item from the top of stack. The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. types of queues : circular, linear, double ended and priority
Linear data structure is used to convert the logical address to physical address .Stack is used in this and the various conversion such as postfix,prefix and infix notation are come in this
No. A stack is a LIFO (Last In First Out) data structure.A queue is a FIFO (First In First Out) data structure.
stack is a linear data structure in which data item is either inserted or deleted at one end there are mainly two operations performed on stack.they're push poppush:writing a value to the stack is push or moving the stack pointer up to accomodatethe new item. pop:reading a value from stack or moving the stack pointer down.
Both are linear data structures.
Explain The merits of using a deque to implement a stack in data structure
no answer
A tree is an example for a non-linear data structure.
stack data structure.
yes
yes it is, other linear data structures are lists,queues,stacks,arrays