wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DSA_VIVA-1

Total questions: 8

Worksheet time: 5mins

Name
Class
Date
1.

_________ is the data structure used for implementing recursion.

a)

Queue

b)

Stack

c)

Array

d)

Linked list

2.

The data structure used in function call management is

a)

Queue

b)

Stack

c)

Tree

d)

Linked list

3.

Which of the following recursion types is most efficient for compiler optimization?

a)

Head recursion

b)

Tail recursion

c)

Tree recursion

d)

Indirect recursion

4.

What is the main drawback of recursion?

a)

Complex logic

b)

Slow execution and high memory usage

c)

Cannot be debugged

d)

Does not work for numeric data

5.

Postfix expression of (A + B) * (C - D) is:

a)

AB+CD-*

b)

ABCD+-*

c)

AB+*CD-

d)

AB+*CD-+

6.

Which of the following postfix expressions corresponds to infix (A + B) * (C + D)?

a)

AB+CD+*

b)

ABCD+*+

c)

A+B*C+D

d)

AB*CD+*

7.

Which of the following traversals gives the postfix expression of an expression tree?

a)

Preorder

b)

Inorder

c)

Postorder

d)

Level order

8.

Given postfix expression 23*54*+9-, the result is:

a)

17

b)

20

c)

25

d)

21