Data Structures :: Stacks

Home > Technical Aptitude > Data Structures > Stacks > General Questions

NA
SHSTTON
56
Solv. Corr.
91
Solv. In. Corr.
147
Attempted
1 M:25 S
Avg. Time

1 / 37

Choose the correct option.

The five items: A,B,C,D and E are pushed in stack, one after the other starting from A. The stack is

Is popped four items and each element is inserted in a queue. Then two elements are deleted from the queue and pushed back on the stack . Now one item is popped from the stack.

The popped item is.


AA

BB

CC

DD

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
69
Solv. Corr.
46
Solv. In. Corr.
115
Attempted
0 M:0 S
Avg. Time

2 / 37

Choose the correct option.

Convert the infix to postfix for A-(B+C)*(D/E)


AABC+DE/*-

BABC-DE/*-

CABC-DE*/-

DNone of the above

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
55
Solv. Corr.
38
Solv. In. Corr.
93
Attempted
0 M:0 S
Avg. Time

3 / 37

Choose the correct option.

What is the postfix form of the following prefix expression -A/B*C$DE


AABCDE$*/-

BA-BCDE$*/-

CABC$ED*/-

DA-BCDE$*/

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
26
Solv. Corr.
61
Solv. In. Corr.
87
Attempted
0 M:0 S
Avg. Time

4 / 37

Choose the correct option.

The minimum number of multiplications and additions required to evaluate the polynomial
P = 4x^3+3x^2-15x+45 is


A6&3

B4&2

C3&3

D8&3

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
89
Solv. Corr.
25
Solv. In. Corr.
114
Attempted
0 M:0 S
Avg. Time

5 / 37

Choose the correct option.

The data structure required to evaluate a postfix expression is


Aqueue

Bstack

Carray

Dlinked-list

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
80
Solv. Corr.
27
Solv. In. Corr.
107
Attempted
0 M:3 S
Avg. Time

6 / 37

Choose the correct option.

The data structure required to check whether an expression contains balanced parenthesis is


AStack

BQueue

CTree

DArray

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
69
Solv. Corr.
37
Solv. In. Corr.
106
Attempted
0 M:0 S
Avg. Time

7 / 37

Choose the correct option.

The process of accessing data stored in a serial access memory is similar to manipulating data on a


Aheap

Bqueue

Cstack

Dbinary tree

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
38
Solv. Corr.
42
Solv. In. Corr.
80
Attempted
0 M:0 S
Avg. Time

8 / 37

Choose the correct option.

The postfix form of the expression is (A+B) * (C*D-E)*F/G is


AAB+CD*E-FG/**

BAB+CD*E-*F*G/

CAB+CD*E-F**G/

DAB+CDE*-*F*G/

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
29
Solv. Corr.
69
Solv. In. Corr.
98
Attempted
0 M:0 S
Avg. Time

9 / 37

Choose the correct option.

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum


AThree nodes

BTwo nodes

COne node

DAny number of nodes

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
68
Solv. Corr.
22
Solv. In. Corr.
90
Attempted
0 M:0 S
Avg. Time

10 / 37

Choose the correct option.

What data structure would you mostly likely see in a nonrecursive implementation of a recursive algorithm?


AStack

BLinked list

CQueue

DTrees

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace