answersLogoWhite

0

Pseudo-code for stack operation

Updated: 12/22/2022
User Avatar

Wiki User

14y ago

Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: Pseudo-code for stack operation
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is Recursion operation of the stack?

yes


What is the operation of delete in stack?

Delete is mostly commonly known as pop in stack. The last element inserted into the stack is removed from the stack. Here is an illustration:Consider the stack with the elements 1,2,3,4 inserted in order.1->2->3->4\topThe top of the stack will be pointing to 4. When pop operation is performed, 4 is removed from the stack and the top is made to point to 3. The stack then becomes:1->2->3\top


Why insert operation in stack called as push operation?

Consider an array used as a stack. Align this array vertically. When an element is inserted into the stack, it is pushed all the way down despite the space availability at the top. Hence it is called push operation. Here's an illustration:Stack initially:|_||_||_||5|Stack after the insertion of 6:|_||_||6| - element pushed down as much as possible|5|


What is push operation in data structure?

Push inserts a value onto the top of the stack. Pop extracts the top value from the stack. These are the two primary operations that can be performed upon a stack. Prior to popping a value, you will first check the stack is not empty, store the top value, then pop the stack. For a stack of type T, you might use the following: if (!stack.empty()) { T value {stack.top()}; // copy top value stack.pop(); // remove value from stack // use value... }


Define list of operation on stack?

There are 4 main widely used stack operations.Operations:* POP - increase stack pointer and return top element * PUSH - putting element into stack's top * TOP - returns data of top element on stack * LENGTH/SIZE - returns number of elements inside stack For more detailed implementation details, please check web links.

Related questions

Where can one find information on Pseudocode?

One can find information about Pseudocode online in various websites. Some of them include the following: Wikipedia, Stack Overflow or Stack Exchange.


What are the stack operation?

there are two operations you can do with a STACK one is PUSH operation and the other is POP operation


How do you write a pseudocode for basic operation on stack?

Stack operations in pseudo-code:STACK-EMPTY(S)if top[S] = 0return trueelse return falsePUSH(S, x)top[S]


What is stack operation in 8085 microprocessor?

STACK operation in 8085 microprocessor.The stack is a reserved area of the memory in RAM where temporary information may be stored. An 8-bit stack pointer is used to hold the address of the most recent stack entry. This location which has the most recent entry is called as the top of the stack.When the information is written on the stack, the operation is called PUSH. When the information is read from the stack, the operation is called POP. The stack works on the principle of Last in First Out or Fist in Lat Out


Is Recursion operation of the stack?

yes


What is stack in 8085 microprocessor?

STACK operation in 8085 microprocessor.The stack is a reserved area of the memory in RAM where temporary information may be stored. An 8-bit stack pointer is used to hold the address of the most recent stack entry. This location which has the most recent entry is called as the top of the stack.When the information is written on the stack, the operation is called PUSH. When the information is read from the stack, the operation is called POP. The stack works on the principle of Last in First Out or Fist in Lat Out


Write a c program to perform stack operation?

int top=-1; int stack[10];


What is the operation of delete in stack?

Delete is mostly commonly known as pop in stack. The last element inserted into the stack is removed from the stack. Here is an illustration:Consider the stack with the elements 1,2,3,4 inserted in order.1->2->3->4\topThe top of the stack will be pointing to 4. When pop operation is performed, 4 is removed from the stack and the top is made to point to 3. The stack then becomes:1->2->3\top


Why insert operation in stack called as push operation?

Consider an array used as a stack. Align this array vertically. When an element is inserted into the stack, it is pushed all the way down despite the space availability at the top. Hence it is called push operation. Here's an illustration:Stack initially:|_||_||_||5|Stack after the insertion of 6:|_||_||6| - element pushed down as much as possible|5|


Compound words are made of individual words as in in factreal word and brass track give pseudocode to a search operation in a trie that will that will find if a given search string is a co?

Compound words are made of individual words as in in factreal word and brass track give pseudocode to a search operation in a trie that will that will find if a given search string is a co?"


What is the function of the stack counter?

Its not a stack counter - its a stack pointer. The stack pointer is a register that points to the top of the stack. In the Intel configuration, it points to the next item to be popped off the stack. To push an item requires that the stack pointer be decremented first, and then the item is written. The inverse operation - the pop - requires read then increment.


Is scanf function follow the que or stack operation?

Your question makes no sense.