wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Technical Quiz

Total questions: 5

Worksheet time: 4mins

Name
Class
Date
1.

What is the amortized time complexity of inserting an element into a dynamic array (resizable array)

when doubling its size?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n log n)

2.

Which of the following tree data structures provides the most optimal search time complexity in

a dynamic environment with frequent insertions and deletions?

a)

AVL Tree

b)

Red-Black Tree

c)

Splay Tree

d)

B-Tree

3.

Which of the following statements about NP-Complete problems is TRUE?

a)

All NP problems are NP-Complete

b)

If any NP-Complete problem is solved in polynomial time, P = NP

c)

NP-Complete problems have known polynomial-time solutions

d)

All NP problems are harder than NP-Complete problems

4.

Which of the following memory allocation techniques suffers from internal fragmentation?

a)

Paging

b)

Segmentation

c)

Buddy System

d)

Best Fit Allocation

5.

In a multi-threaded program, which of the following statements is TRUE about mutex

and semaphore?

a)

A mutex can be used for multiple resource access, while a semaphore is for single resource access

b)

A semaphore allows multiple threads to enter a critical section, while a mutex allows only one

c)

A mutex allows multiple threads to enter a critical section simultaneously

d)

A semaphore provides stronger mutual exclusion than a mutex