wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DSA BCA

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.


Which of the following data structures finds its use in recursion?

a)

Link List

b)

Stack

c)

Queue

d)

Array

2.

Insertion of an element at the middle of a linked list requires the modification of how many pointers?

a)

1

b)

3

c)

2

d)

4

3.

The type of pointer used to point to the address of the next element in a linked list?

a)

char

b)

int

c)

node

d)

none of the above

4.


Which of the following data structures allow insertion and deletion from both ends?

a)

Stack

b)

Link List

c)

Queue

d)

Dequeue

5.


Which of the following sorting algorithms provide the best time complexity in the worst-case scenario?

a)

Merge Sort

b)

quick sort

c)

selection sort

d)

bubble sort

6.

What is the best case time complexity of the binary search algorithm?

a)

1

b)

log n

c)

n2

d)

nlogn

7.

Which of the following algorithms is not a comparison-based sorting algorithm?

a)

Heap Sort

b)

Merge Sort

c)

Quick Sort

d)

Counting Sort

8.

What is the space complexity of a recursive function that uses a stack?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n2)

9.

Which data structure is used to implement a breadth-first search (BFS) algorithm?

a)

Queue

b)

Stack

c)

Array

d)

Linked List

10.

Consider the following statements:

i. First-in-first out types of computations are efficiently supported by STACKS.
ii. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.
iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.
iv. Last-in-first-out type of computations are efficiently supported by QUEUES.

Which of the following is correct?

a)

ii

b)

i & iv

c)

iii

d)

iv