DS Quizz

DS Quizz

University

12 Qs

quiz-placeholder

Similar activities

Game xì chét

Game xì chét

University - Professional Development

10 Qs

E.A P1

E.A P1

University

10 Qs

Đạo văn và hiểu biết của bạn

Đạo văn và hiểu biết của bạn

University

10 Qs

Optimization

Optimization

University

10 Qs

Deret huruf

Deret huruf

University

10 Qs

ĐV - Buổi 7 - Chiến thuật giải thích

ĐV - Buổi 7 - Chiến thuật giải thích

1st Grade - University

10 Qs

X Y DỰNG MỐI QUAN HỆ TRUNG THÀNH VỀ DÀI HẠN

X Y DỰNG MỐI QUAN HỆ TRUNG THÀNH VỀ DÀI HẠN

University

10 Qs

TTHCM VỀ CNXH VÀ XÂY DỰNG CNXH Ở VN HIỆN NAY

TTHCM VỀ CNXH VÀ XÂY DỰNG CNXH Ở VN HIỆN NAY

University

10 Qs

DS Quizz

DS Quizz

Assessment

Quiz

Education

University

Medium

Created by

Auzoom four

Used 1+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the time complexity of Binary Search in the worst case?

O(n)

O(log n)

O(n log n)

O(n^2)

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a stable sorting algorithm?

Quick Sort

Merge Sort

Heap Sort

Selection Sort

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In which case does Linear Search outperform Binary Search?

When the array is sorted

When the array has duplicate elements

When the array is small and unsorted

When the array is large and sorted

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is true about the time complexity of Selection Sort?

It is O(n) in the worst case.

It is O(n log n) in the best case.

It is O(n^2) in both the worst and best cases.

It is O(log n) in the worst case.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Consider the following pseudocode:

for i = 1 to n:

for j = 1 to i:

print(i, j)

O(n)

O(n log n)

O(n^2)

O(n^3)

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Consider the following pseudocode:

for i = 0 to n-1:

minIndex = i

for j = i+1 to n:

if arr[j] < arr[minIndex]:

minIndex = j

swap arr[i] with arr[minIndex]

What is the time complexity of this algorithm?

A) O(n)

B) O(n log n)

C) O(n^2)

D) O(n^3)

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Consider the following pseudocode:

for i = 1 to n:

for j = 1 to n:

for k = 1 to n:

print(i, j, k)

What is the time complexity of this algorithm?

O(n)


O(n^2)

O(n^3)

O(n log n)

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?