Reference no: EM132779147
1. What do we call the process of inserting an element in stack? explain
2. What do we call the process of removing an element in stack?explain
3. In a stack, if a user tries to remove an element from an empty stack it is called? Explain
4. Pushing an element into stack already having five elements and stack size of 5, then stack becomes what? Explain
5. Entries in a stack are "ordered". What is the meaning of this statement?explain
6. Which of the following is not the application of stack?
a) A parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer
d) Data Transfer between two asynchronous process
7. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?
8.. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?
9. What is the value of the postfix expression 6 3 2 4 + - *?
10. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation. The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?