C++ Quiz 5: Searching and Sorting Algorithms

C++ Quiz 5: Searching and Sorting Algorithms

7th - 12th Grade

9 Qs

quiz-placeholder

Similar activities

Micro:bit assessment 1

Micro:bit assessment 1

7th - 8th Grade

10 Qs

แบบทดสอบก่อนเรียน หน่วยที่ 1 การแก้ปัญหาและขั้นตอนวิธี ม.4/1

แบบทดสอบก่อนเรียน หน่วยที่ 1 การแก้ปัญหาและขั้นตอนวิธี ม.4/1

10th Grade

10 Qs

Quiz 3-  Life Cycle of Program

Quiz 3- Life Cycle of Program

10th Grade

10 Qs

G7_ICT_1.1_Digital Data

G7_ICT_1.1_Digital Data

7th Grade

10 Qs

Tree

Tree

12th Grade

10 Qs

Algoritma dan Pemrograman (A)

Algoritma dan Pemrograman (A)

10th Grade

10 Qs

คอมพิวเตอร์ ม.1.2

คอมพิวเตอร์ ม.1.2

7th Grade

10 Qs

Perbaikan Kuis Kelas 9 Bab 1 dan 2

Perbaikan Kuis Kelas 9 Bab 1 dan 2

9th Grade

10 Qs

C++ Quiz 5: Searching and Sorting Algorithms

C++ Quiz 5: Searching and Sorting Algorithms

Assessment

Quiz

Computers

7th - 12th Grade

Practice Problem

Medium

Created by

Jerry Xiao

Used 149+ times

FREE Resource

AI

Enhance your content in a minute

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

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Linear search algorithm:

Scans each index until finding a matching value

Repeatedly dividing in half the array until found

Bubble sorting technique

None of them

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Linear Search works when the array is?

Sorted

Unsorted

Both

None of the above

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

A binary search algorithm can be best described as what?

A instant lookup method

Repeatedly dividing in half the array until found

Start at the head, move through the list until found

None of the above

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

When is Binary Search preferred over Linear Search?

Small Database

Sorted Database

Unsorted Database

None of the above

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Using binary search in this sorted array:

3 7 10 45 84 100 153 170

How many comparisons would it take to find number 170?

0 – 1

1 – 2

3 – 4

4 – 5

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

The maximum comparisons needed in Binary Search on array of size 16 is:

16

8

4

5

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

The maximum comparisons needed in Linear Search on array of size 32 is:

32

33

16

31

8.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Insertion sort is a sorting algorithm in which the elements are transferred one at a time to the right position

True

False

9.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the first change that insertion sort would make to this sequence?

“6 2 5 9”

6 9 5 2

5 9 6 2

9 5 2 6

2 6 5 9