Search Header Logo

Search and Sort Algorithms

Authored by Ms O'Grady

Computers

9th Grade

Search and Sort Algorithms
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of Linear Search?

O(log n)

O(n)

O(n^2)

O(1)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain how Binary Search works.

Binary Search has a time complexity of O(n^2)

Binary Search is a linear search algorithm

Binary Search can only be applied to sorted arrays

Binary Search is an efficient algorithm with a time complexity of O(log n) where n is the number of elements in the array.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does Bubble Sort algorithm work?

Bubble Sort algorithm compares each pair of adjacent items and swaps them if they are in the correct order.

Bubble Sort algorithm compares each pair of adjacent items and swaps them if they are in the wrong order.

Bubble Sort algorithm sorts the array by dividing it into subarrays and merging them.

Bubble Sort algorithm randomly shuffles the elements in the array.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of Selection Sort?

O(n^2)

O(nlogn)

O(1)

O(n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Describe how Insertion Sort algorithm functions.

Insertion Sort algorithm functions by removing the smallest element from the array

Insertion Sort algorithm functions by randomly shuffling the elements in the array

Insertion Sort algorithm functions by comparing the first and last elements of the array

Insertion Sort algorithm functions by repeatedly taking an element from the unsorted part of the array and inserting it into its correct position in the sorted part of the array.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When is Linear Search preferred over Binary Search?

When the list is not sorted or sorting the list is costly.

When the list is already sorted

When the search is for the last element in the list

When the list is very small

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main difference between Bubble Sort and Selection Sort?

Bubble Sort sorts elements in descending order, while Selection Sort sorts in ascending order.

The main difference is in the way elements are compared and swapped: Bubble Sort compares adjacent elements, while Selection Sort selects the smallest element.

Bubble Sort always performs better than Selection Sort in terms of efficiency.

Bubble Sort has a time complexity of O(n log n), while Selection Sort has a time complexity of O(n^2).

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?