The equivalent infix expression and value for the postfix form 1 2 + 3 * 4 5 * - will be . . . . . . . .
A. 1 + 2 * 3 - 4 * 5 and -13
B. (2 + 1) * (3 - 4) * 5 and 13
C. 1 + 2 * (3 - 4) * 5 and -11
D. (1 + 2) * 3 - (4 * 5) and -11
Answer: Option D
A. 1 + 2 * 3 - 4 * 5 and -13
B. (2 + 1) * (3 - 4) * 5 and 13
C. 1 + 2 * (3 - 4) * 5 and -11
D. (1 + 2) * 3 - (4 * 5) and -11
Answer: Option D
What is the time complexity of push operation in a stack implemented using an array?
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
What is the stack's behavior when it's described as LIFO?
A. Last In First Out
B. Last In Last Out
C. First In First Out
D. First In Last Out
How can you implement a stack using a linked list?
A. By using a singly linked list
B. By using a doubly linked list
C. By using a circular linked list
D. All of the above
Join The Discussion