Stack
Class 12 · Computer Science · 7 Questions
For the following arithmetic expression: ((2+3)*(4/2))+2 Show step-by-step process for matching parentheses using stack data structure.
Write a program to reverse a string using stack.
State TRUE or FALSE for the following cases:
Find the output of the following code:
Evaluate following postfix expressions while showing status of stack after each operation given A=3, B=5, C=1, D=4
Convert the following infix notations to postfix notations, showing stack and string contents at each step.
Write a program to create a Stack for storing only odd numbers out of all the numbers entered by the user. Display the content of the Stack along with the largest odd number in the Stack. (Hint. Keep popping out the elements from stack and maintain the largest element retrieved so far in a variable. Repeat till Stack is empty)