Introduction To Data Structures - Study Mode

[#1] Which of the following array position will be occupied by a new element being pushed for a stack of size N elements(capacity of stack > N)?
Correct Answer

(B) S[N]

[#2] Consider you have a stack whose elements in it are as follows. 5 4 3 2 << top Where the top element is 2. You need to get the following stack 6 5 4 3 2 << top The operations that needed to be performed are (You can perform only push and pop):
Correct Answer

(A) Push(pop()), push(6), push(pop())

[#3] Which data structure is used for implementing recursion?
Correct Answer

(B) Stack
(G) Stack

[#4] Which of the following data structures can be used for parentheses matching?
Correct Answer

(D) stack

[#5] 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?
Correct Answer

(D) 4