answersLogoWhite

0

What else can I help you with?

Related Questions

Can stack be called fifo data structure?

No. A stack is a LIFO (Last In First Out) data structure.A queue is a FIFO (First In First Out) data structure.


Explain The merits of using a deque to implement a stack in data structure?

Explain The merits of using a deque to implement a stack in data structure


What is a stack in data structure?

A stack in Data structure is a LIFO structure. Last In First Out. Think of it as a stack of books or a stack of trays in a cafeteria line. when you are in a line in a cafeteria you take the tray that is on the top and the worker place new washed ones also on the top. So deletion and insertion all done at one end, it is called the top of the stack. In Computer Programming Stacks are so important and have too many applications such as the evaluation of Mathematical expressions. Also note that a stack is unlike a queue structure. Queue data structure is FIFO. First In First Out as in a bank teller line.


Which type of data structure is used in ATM to take the printout of last 5 transactions?

stack data structure.


What are some common operations that can be performed on a stack data structure?

Common operations that can be performed on a stack data structure include push (adding an element to the top of the stack), pop (removing the top element from the stack), peek (viewing the top element without removing it), and isEmpty (checking if the stack is empty).


How can you add different type of data in a stack?

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.


The best data structure to check whether an arithmetic expression has balanced parentheses is a?

stack


Which data structure is needed to convert infix notations to post fix notations?

stack is the basic data structure needed to convert infix notation to postfix


How can I efficiently use a stack to sort elements in a data structure?

To efficiently use a stack to sort elements in a data structure, you can follow these steps: Push all elements into the stack. Create a temporary stack to store the sorted elements. While the original stack is not empty, pop an element from the original stack. Compare the popped element with the top element of the temporary stack. If the popped element is greater, push it onto the temporary stack. If the popped element is smaller, keep popping elements from the temporary stack and pushing them back onto the original stack until the temporary stack is empty or the top element is greater. Repeat steps 3-6 until the original stack is empty. The elements in the temporary stack will now be sorted in ascending order. By following these steps, you can efficiently use a stack to sort elements in a data structure.


What is stacks in data structure?

Stack is a data structure which is closed at one end. last in first outhi


What is LIFO in Data Structure?

LIFO stands for Last In First Out. Ex: Stack


Representation of stack data structure in c plus plus?

Stack is an abstract data type that allows you to input and output data in a way that the first data which was placed in the stack will be the last one to get out. We use physical examples of stack in our daily lives such as the stack of dishes or stack of coins where you only add or remove objects from the top of the stack. You can see the implementation in c++ in related links, below.