Search Header Logo

Searching & Sorting

Computers

11th - 12th Grade

Used 11+ times

Searching & Sorting
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Using a binary search why will the number 9 never be found in the following list:

11, -8, 13, 9, 7, 3

It does not work on numbers

It only works on letters

The list is not sorted

The binary search does not work if there is a negative number

Binary search requires a minimum of 30 data points

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Which type of sort algorithm is this?

Insertion

Merge

Bubble

Selection

Binary

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

After 2 passes - which algorithm was used:

Original : [63, 65, 78, 42, 64, 18]

After 4 passes: [42, 63, 65, 78, 64, 18]

Bubble Sort

Insertion Sort

Merge Sort

Linear Search

Binary Search

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following correctly shows the iterations of an ascending (from left to right) insertion sort on an array with the following elements: {7,3,8,5,2}?

{3,7,8,5,2}, {3,7,8,5,2}, {3,5,7,8,2}, {2,3,5,7,8}

{2,3,8,5,7}, {2,3,8,5,7}, {2,3,5,8,7}, {2,3,5,7,8}

{3,7,8,5,2}, {3,5,7,8,2}, {2,3,5,7,8}

{2,3,8,5,7}, {2,3,5,8,7}, {2,3,5,7,8}

{2,7,3,8,5}, {2,3,7,8,5}, {2,3,5,7,8}

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What is printed when the following main method is executed?

-1

0

1

2

3

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following correctly shows the iterations of an ascending (from left to right) selection sort on an array with the following elements: {10, 6, 3, 2, 8}?

{6,10,3,2,8}, {3,6,10,2,8}, {2,3,6,10,8}, {2,3,6,8,10}

{6,10,3,2,8}, {3,6,10,2,8}, {2,3,6,8,10}

{2,6,3,10,8}, {2,3,6,10,8}, {2,3,6,8,10}

{2,6,3,10,8}, {2,3,6,10,8}, {2,3,6,10,8}, {2,3,6,8,10}

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Which of the following could be used to replace // missing code // in the code so that the method always sorts the array elem in ascending order?

int k = j - 1; k >= 0; k--

int k = j + 1; k < elem.length; k++

int k = j; k < elem.length; k++

int k = j; k >= 0; k--

int k = j - 1; k > 0; k--

Access all questions and much more by creating a free account

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

Already have an account?