Data Structures and Algorithms

Data Structures and Algorithms

University

30 Qs

quiz-placeholder

Similar activities

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

30 Qs

Struktur Data

Struktur Data

University - Professional Development

30 Qs

AI Quiz 26/9

AI Quiz 26/9

University

26 Qs

CS 213 - Data Structures and Algorithm

CS 213 - Data Structures and Algorithm

University

25 Qs

QUIZ

QUIZ

University

25 Qs

BUG-OFF

BUG-OFF

University

30 Qs

Battle With DSA

Battle With DSA

University

30 Qs

C++ with DS

C++ with DS

University

25 Qs

Data Structures and Algorithms

Data Structures and Algorithms

Assessment

Quiz

Computers

University

Medium

Created by

Hamna Iqbal

Used 3+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is true about Binary Search?

It works only on sorted arrays.

It works on both sorted and unsorted arrays.

It requires an additional data structure to operate.

It is faster than linear search for all datasets.

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

What is the time complexity of the worst-case scenario for Linear Search?

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which sorting algorithm is best suited for nearly sorted data?

Bubble Sort

Insertion Sort

Both

None

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does swapping two elements during Bubble Sort achieve?

places the largest element in its correct position.

It finds the median of the array.

It guarantees the array is sorted.

It splits the array into two halves.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is true for a Queue?

None

Both

It is a LILO structure.

It is a FIFO structure.

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What happens if we try to dequeue an element from an empty queue?

It raises an error.

It returns null.

It proceeds with a default value.

It returns the first element added.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is NOT required for Binary Search?

All elements in the array must be distinct.

The array must be sorted.

A middle element must be calculated.

Recursive calls or iterations are used.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?