wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ADSA_Unit-1_ Quiz-1

Total questions: 50

Worksheet time: 50mins

Name
Class
Date
1.

Which of the following is NOT a characteristic of a good algorithm?

a)

Finiteness

b)

Effectiveness

c)

Ambiguity

d)

Feasibility

2.

Which of these is not part of space complexity?

a)

Input space

b)

Auxiliary space

c)

Compilation space

d)

Output space

3.

In the algorithm analysis, T(p)=C(p)+R(p) refers to:

a)

Space complexity formula

b)

Time complexity formula

c)

Recursion time

d)

None of the above

4.

The purpose of using algorithms is:

a)

To reduce memory

b)

To avoid errors

c)

To get output efficiently

d)

To avoid recursion

5.

What is the main difference between data and information?

a)

Information is raw, data is processed

b)

Data is raw, information is processed

c)

Both are same

d)

Information is random

6.

Which of the following is used for time complexity analysis?

a)

Memory graph

b)

Time graph

c)

Asymptotic notations

d)

Control flow graph

7.

In the algorithm syntax, the keyword used to start an algorithm is:

a)

procedure

b)

start

c)

Algorithm

d)

function

8.

Which of the following operations does not affect space complexity much?

a)

Recursion

b)

Variable declarations

c)

Input storage

d)

Loop iterations

9.

Which notation gives the worst-case performance of an algorithm?

a)

Θ(n)

b)

Ω(n)

c)

O(n)

d)

o(n)

10.

Which of the following notations gives both upper and lower bounds?

a)

O(n)

b)

Ω(n)

c)

Θ(n)

d)

ω(n)

11.

What does the omega (Ω) notation describe?

a)

Best case

b)

Worst case

c)

Average case

d)

None of the above

12.

If an algorithm has T(n) = o(n log n), what does it imply?

a)

Grows faster than n log n

b)

Grows slower than n log n

c)

Grows at same rate as n log n

d)

Constant time

13.

Which of the following is the correct representation of time complexity for bubble sort (worst case)?

a)

O(n)

b)

O(n log n)

c)

O(n²)

d)

O(1)

14.

The notation ω(f(n)) provides:

a)

Loose upper bound

b)

Tight upper bound

c)

Strict lower bound

d)

Constant space

15.

Which notation means the function becomes insignificant compared to f(n)?

a)

Θ(f(n))

b)

o(f(n))

c)

ω(f(n))

d)

O(f(n))

16.

What is the best-case complexity of bubble sort?

a)

Ω(n)

b)

Θ(n log n)

c)

Θ(n²)

d)

O(n³)

17.

What notation is used when an algorithm takes at most f(n) time?

a)

Ω(f(n))

b)

Θ(f(n))

c)

O(f(n))

d)

ω(f(n))

18.

Which of the following notations indicate that the algorithm always takes time proportional to f(n)?

a)

Θ(f(n))

b)

O(f(n))

c)

o(f(n))

d)

Ω(f(n))

19.

Which of the following is true about little omega notation?

a)

T(n) is smaller than f(n)

b)

T(n) is much faster than f(n)

c)

T(n) is equal to f(n)

d)

T(n) is slower than f(n)

20.

What is the graphical representation in Θ(f(n)) notation?

a)

Curve lies above f(n)

b)

Curve lies below f(n)

c)

Curve lies between two constants multiplied by f(n)

d)

Curve is exponential

21.

AVL Tree is named after:

a)

Allen, Venn, Lewis

b)

Adelson-Velsky and Landis

c)

Andrew, Victor, Leo

d)

Alexander, Vincent, Lee

22.

What is the balancing factor for a balanced AVL tree node?

a)

{-2, 0, 2}

b)

{-1, 0, 1}

c)

{-3, 0, 3}

d)

{0, 1}

23.

Which rotation is used when the tree becomes left-heavy then right-heavy?

a)

Left-Left Rotation

b)

Right-Right Rotation

c)

Left-Right Rotation

d)

Right-Left Rotation

24.

What is the time complexity for insertion in AVL Tree?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n²)

25.

Which of these is NOT an application of AVL Trees?

a)

Sorted data collections

b)

Efficient searching

c)

Complex indexing

d)

Image compression

26.

What is the rotation used when both child and grandchild are on the right?

a)

Right-Right Rotation

b)

Right-Left Rotation

c)

Left-Left Rotation

d)

Left-Right Rotation

27.

What happens when a root node is deleted in AVL tree?

a)

Tree crashes

b)

Rebalancing is not required

c)

In-order predecessor/successor is used

d)

New tree is created

28.

AVL Tree is a type of:

a)

Heap Tree

b)

General Tree

c)

Balanced Binary Search Tree

d)

B-Tree

29.

Which of the following is NOT a disadvantage of AVL Trees?

a)

Complex implementation

b)

More time consuming

c)

Sorted storage

d)

Costly rotations

30.

Why is AVL tree better for searching than BST?

a)

Always balanced

b)

Needs more space

c)

Not suitable for small data

d)

Takes more time

31.

B-Tree is designed for:

a)

Short data sets

b)

Large databases

c)

Real-time systems

d)

Image processing

32.

What is the minimum number of children for an internal node in B-tree of order M?

a)

0

b)

1

c)

⌈M/2⌉

d)

M

33.

In B-Tree, all leaf nodes:

a)

Have one key

b)

Are at same level

c)

Have no children

d)

Have only left child

34.

The root node in B-Tree must have at least:

a)

0 children

b)

1 child

c)

2 children

d)

M children

35.

Which of the following is NOT true about B-Tree?

a)

Nodes have more than one key

b)

All nodes have same number of children

c)

Keys are stored in sorted order

d)

Internal nodes can store keys

36.

Where are elements inserted in B-Trees?

a)

Root

b)

Leaf

c)

Internal Node

d)

Random

37.

When a node in B-Tree is full, what happens?

a)

Tree is destroyed

b)

Tree is rebalanced

c)

Node is split

d)

Node is skipped

38.

What is the maximum number of keys a node in B-Tree of order M can have?

a)

M

b)

M+1

c)

M-1

d)

M/2

39.

Searching in a B-Tree begins from:

a)

Leaf

b)

Root

c)

Middle

d)

Random

40.

Which bias conditions are used in B-Tree splitting?

a)

Left and Right

b)

Binary and Ternary

c)

Single and Multiple

d)

Top and Bottom

41.

In B-Tree deletion, if key is found in internal node, it is replaced by:

a)

Any value

b)

Root value

c)

Inorder predecessor or successor

d)

NULL

42.

One major advantage of B-Trees is:

a)

No rebalancing

b)

Linear access

c)

Efficient disk access

d)

Fixed height

43.

B-Tree is mostly used in:

a)

Audio processing

b)

Database systems

c)

Operating systems

d)

Image compression

44.

Which of the following is a disadvantage of B-Tree?

a)

Self-balancing

b)

Quick access

c)

High memory consumption

d)

Efficient indexing

45.

B-Tree allows multiple children due to:

a)

Binary structure

b)

Multiple root nodes

c)

Multiple key storage per node

d)

Incomplete nodes

46.

The height of a B-Tree depends on:

a)

Leaf nodes only

b)

Number of keys

c)

Order "M"

d)

Rotations

47.

How many keys does the root node of a B-Tree usually have?

a)

M

b)

M-1

c)

1

d)

0

48.

What is the key property of internal nodes in B-Tree?

a)

Always full

b)

Balanced

c)

Have at least ⌈M/2⌉ children

d)

Leaf-level nodes

49.

What is the time complexity of searching in a B-Tree?

a)

O(n)

b)

O(log n)

c)

O(n log n)

d)

O(1)

50.

Why are B-Trees preferred in databases?

a)

Simple implementation

b)

Stores unsorted data

c)

Supports multilevel indexing

d)

Small size