Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algo Duel

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

Which of the following data structures can be used to implement a priority queue?

a)

Stack

b)

Queue

c)

Heap

d)

LinkedList

2.

What is the time complexity of inserting an element in a binary search tree (BST) on average?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n log n)

3.

Which of the following sorting algorithms is considered stable?

a)

QuickSort

b)

MergeSort

c)

HeapSort

d)

SelectionSort

4.

Which of the following is an example of a dynamically typed programming language?

a)

Java

b)

C

c)

Python

d)

C++

5.

In a relational database, which of the following SQL clauses is used to group rows that have the same values in specified columns?

a)

WHERE

b)

ORDER BY

c)

GROUP BY

d)

HAVING

6.

Which one of the following is not a characteristic of Object-Oriented Programming?

a)

Encapsulation

b)

Inheritance

c)

Polymorphism

d)

Recursion

7.

Which of the following is used to measure the performance of an algorithm?

a)

Time complexity

b)

Data abstraction

c)

Binary Search

d)

Compilation time

8.

In the OSI model, which layer is responsible for data encryption?

a)

Physical Layer

b)

Data Link Layer

c)

Network Layer

d)

Presentation Layer

9.

In C programming, which of the following is a valid pointer declaration?

a)

intptr;

b)

int* ptr;

c)

ptrint;

d)

int& ptr;

10.

Which protocols are used to retrieve emails from a remote mail server?

a)

SMTP

b)

FTP

c)

POP3

d)

HTTP

11.

Which of the following is NOT a type of memory in a computer?

a)

Cache

b)

RAM

c)

SSD

d)

ROM

12.

What is the main purpose of DNS in a computer network?

a)

To encrypt data

b)

To translate domain names to IP addresses

c)

To configure network devices

d)

To check data integrity

13.

Which of the following is an example of a lossless compression algorithm?

a)

JPEG

b)

MP3

c)

GIF

d)

MPEG

14.

In Object-Oriented Programming, which feature allows a subclass to override a method of its superclass?

a)

Encapsulation

b)

Inheritance

c)

Abstraction

d)

Polymorphism

15.

Which of the following is NOT a relational database management system (RDBMS)?

a)

MySQL

b)

PostgreSQL

c)

MongoDB

d)

SQLite

16.

In the context of Operating Systems, what is 'thrashing'?

a)

Excessive paging leading to degraded system performance

b)

A method of memory allocation

c)

A type of deadlock prevention technique

d)

A technique for handling interrupts

17.

Which sorting algorithm has the best average case time complexity for sorting an unsorted array?

a)

QuickSort

b)

BubbleSort

c)

MergeSort

d)

InsertionSort

18.

Which of the following is true about deadlock in operating systems?

a)

Deadlock occurs when all resources are available

b)

Deadlock can occur if four necessary conditions are met

c)

Deadlock only occurs in distributed systems

d)

Deadlock can always be prevented by using semaphores

19.

Which of the following is a NoSQL database?

a)

Oracle

b)

Microsoft SQL Server

c)

Cassandra

d)

DB2

20.

What is the default port number for HTTPS communication?

a)

21

b)

80

c)

443

d)

8080