Computer Science, asked by Anonymous, 5 months ago

B. Short answer questions
1. Define stack.

2. What are the primitive operations on stack?

3. State the principle on which a stack works.

4. Name the data structure used in recursion​

Answers

Answered by vanishasaxena09
0

Answer:

1.In computing, a stack is a data structure used to store a collection of objects. Individual items can be added and stored in a stack using a push operation. Objects can be retrieved using a pop operation, which removes an item from the stack.

2. I don't know.

3.A stack works on the principle of Last In - First Out (LIFO) since removing a plate other than the top one on the stack is not very easy without first removing those plates above it in the stack.

4.Implementation. Many programming languages implement recursion by means of stacks. Generally, whenever a function (caller) calls another function (callee) or itself as callee, the caller function transfers execution control to the callee.

Explanation:

hope you got it.

follow meee.

Answered by victoria8164
0

Explanation:

1. a pile of objects, typically one that is neatly arranged.

2. The primitive operations performed on the stack are as follows: PUSH: The process of adding (or inserting) a new element to the top of the stack is called PUSH operation. Pushing an element to a stack will add the new element at the top. After every push operation the top is incremented by one.

3. A stack works on the principle of Last In - First Out (LIFO) since removing a plate other than the top one on the stack is not very easy without first removing those plates above it in the stack.

4. Some computer programming languages allow a module or function to call itself. This technique is known as recursion. In recursion, a function α either calls itself directly or calls a function β that in turn calls the original function α. The function α is called recursive function.

HOPE IT HELPS

IF YES THEN MARK IT AS BRAINLIST

THANKYOU

Similar questions