Search Header Logo

Sorting & Searching Algorithms

Authored by B McCue

Computers

12th Grade

Used 6+ times

Sorting & Searching Algorithms
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a searching algorithm?

To write a novel

To play music

To cook a meal

To locate a specific item or value within a collection of data.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which searching algorithm has a time complexity of O(log n)?

Binary search

Linear search

Depth-first search

Breadth-first search

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fill in the blank: Linear search has a time complexity of ________.

O(n)

O(log n)

O(1)

O(n^2)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of binary search?

O(n^2)

O(n)

O(1)

O(log n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which sorting algorithm works by repeatedly swapping adjacent elements if they are in the wrong order?

Bubble Sort

Insertion Sort

Quick Sort

Merge Sort

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fill in the blank: Bubble sort has a time complexity of ________.

O(nlogn)

O(n)

O(n^2)

O(1)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of merge sort over bubble sort?

Merge sort is less stable than bubble sort

Efficiency in terms of time complexity

Merge sort has a higher space complexity

Merge sort is easier to implement

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?