Sorting Quiz

Sorting Quiz

University - Professional Development

15 Qs

quiz-placeholder

Similar activities

Referencing

Referencing

University - Professional Development

10 Qs

Ulangan Progdas

Ulangan Progdas

University

15 Qs

UK 101

UK 101

Professional Development

13 Qs

Formative Round 1

Formative Round 1

University

20 Qs

Post Test

Post Test

Professional Development

15 Qs

CodeMavarick

CodeMavarick

University

20 Qs

Multiple Intellegencies

Multiple Intellegencies

University

20 Qs

MIDWIFERY AND OBSTETRICAL NURSING

MIDWIFERY AND OBSTETRICAL NURSING

University

20 Qs

Sorting Quiz

Sorting Quiz

Assessment

Quiz

Other, Education, Science

University - Professional Development

Practice Problem

Medium

Created by

B G

Used 18+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

How many passes does an insertion sort algorithm consist of?

n

n-1

n+1

Answer explanation

An insertion algorithm consists of N-1 passes when an array of N elements is given

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the average case running time of an insertion sort algorithm?

Answer explanation

The average case analysis of a tight bound algorithm is mathematically achieved to be O(N2).

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Insertion Sort is

stable and sorts in place

unstable and sorts in place

stable and does NOT sort in place

NOT stable and does NOT sort in place

Answer explanation

During insertion sort, the relative order of elements is not changed. Therefore, it is a stable sorting algorithm. And insertion sort requires only O(1) of additional memory space. Therefore, it sorts In-place.

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following sorting algorithm is best suited if the elements are already sorted?

Insertion Sort

Merge Sort

Heap Sort

Answer explanation

The best case running time of the insertion sort is O(n). The best case occurs when the input array is already sorted. As the elements are already sorted, only one comparison is made on each pass, so that the time required is O(n).

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Merge sort uses which of the following technique to implement sorting?

backtracking

greedy algorithm

divide and conquer

dynamic programming

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the average case time complexity of merge sort?

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the space complexity of merge sort?

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?