Data Structures :: Stacks

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

NA
SHSTTON
76
Solv. Corr.
120
Solv. In. Corr.
196
Attempted
0 M:55 S
Avg. Time

1 / 93

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
96
Solv. Corr.
60
Solv. In. Corr.
156
Attempted
0 M:0 S
Avg. Time

2 / 93

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

 View Answer |  Discuss in Forum |  Workspace | Asked In WiproSociete Generale |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
69
Solv. Corr.
56
Solv. In. Corr.
125
Attempted
0 M:0 S
Avg. Time

3 / 93

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
28
Solv. Corr.
86
Solv. In. Corr.
114
Attempted
0 M:0 S
Avg. Time

4 / 93

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
120
Solv. Corr.
37
Solv. In. Corr.
157
Attempted
0 M:0 S
Avg. Time

5 / 93

Choose the correct option.

The data structure required to evaluate a postfix expression is


Aqueue

Bstack

Carray

Dlinked-list

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
107
Solv. Corr.
37
Solv. In. Corr.
144
Attempted
0 M:3 S
Avg. Time

6 / 93

Choose the correct option.

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


AStack

BQueue

CTree

DArray

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
87
Solv. Corr.
56
Solv. In. Corr.
143
Attempted
0 M:0 S
Avg. Time

7 / 93

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
53
Solv. Corr.
55
Solv. In. Corr.
108
Attempted
0 M:0 S
Avg. Time

8 / 93

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
36
Solv. Corr.
96
Solv. In. Corr.
132
Attempted
0 M:0 S
Avg. Time

9 / 93

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

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
97
Solv. Corr.
29
Solv. In. Corr.
126
Attempted
0 M:0 S
Avg. Time

10 / 93

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