Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

Data Structure QUESTIONS : PART 3

Well formed parenthesis can be checked using following data structure ?

Stack

List

Queue

Hash Map

SHOW ANSWER

Post fix form of

A + (B * C)

is -

AB * C +

ABC * +

AB + C *

ABC + *

SHOW ANSWER

Post fix form of -

(A + B) * C

ABC + *

AB * C +

ABC * +

AB + C*

SHOW ANSWER

When user switch from one function to other then the details of previous function are stored into the stack !

False

True

SHOW ANSWER

Consider following Scenario -

The five items : P,Q,R,S and T are inserted into stack A one after other starting from T in reverse order

The stack is popped three times and each element is inserted into another stack B.

Then two elements are deleted from the stack B and pushed back onto the stack A.

What are the topmost elements of stack A and Stack B respectively?

R Q

Q P

Q R

R P

SHOW ANSWER

If memory for the run-time stack is only 150 cells(words), how big can N be in Factorial(N) before stack overflow?

66

60

26

12

SHOW ANSWER

A postfix expression is just the reverse of the prefix expression !

False

True

SHOW ANSWER

Stack A has 3 Elements in it Say X,Y and Z with X on top.

Stack B is empty.

An Element popped out from Stack A can be printed immediately or pushed to stack B.

An Element popped out from Stack B can only be printed.

In this arrangement, which of the following permutations of X,Y,Z are not possible ?

Z Y X

Y Z X

Y X Z

Z X Y

SHOW ANSWER

An item that is read as input can be either pushed to a stack and later popped and printed, or printed directly. Which of the following will be the output if the input is the sequence of items 1, 2, 3, 4, 5?

3 4 5 1 2

5 4 3 1 2

3 4 5 2 1

1 5 2 3 4

SHOW ANSWER

A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?

Queue

Stack

Tree

Linked list

SHOW ANSWER

The data structure required for Breadth First Traversal on a graph is?

Stack

Array

Queue

Tree

SHOW ANSWER

Let the following circular queue can accommodate maximum six elements with the following data

front = 2 rear = 4

queue = _______; L, M, N, ___, ___

What will happen after ADD O operation takes place?

front = 2 rear = 5

queue = ______; L, M, N, O, ___

front = 3 rear = 5

queue = L, M, N, O, ___

front = 3 rear = 4

queue = ______; L, M, N, O, ___

front = 2 rear = 4

queue = L, M, N, O, ___

SHOW ANSWER

A queue is a ?

FIFO (First In First Out) list

LIFO (Last In First Out) list.

Ordered array

Linear tree

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in