CS Algorithms Quiz

CS Algorithms Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

44. Algorithms - Bubble Sort Algorithm Quiz

44. Algorithms - Bubble Sort Algorithm Quiz

9th - 12th Grade

11 Qs

SLR5 | Algorithms

SLR5 | Algorithms

12th Grade

15 Qs

XII Computer Science UNIT-1(1-MarkTest)

XII Computer Science UNIT-1(1-MarkTest)

11th - 12th Grade

11 Qs

Sorting algorithms (Y11)

Sorting algorithms (Y11)

8th Grade - University

20 Qs

Understanding Bubble Sort Algorithm

Understanding Bubble Sort Algorithm

12th Grade

10 Qs

Sorting & Searching Algorithms

Sorting & Searching Algorithms

12th Grade

16 Qs

2.1 Linear Search

2.1 Linear Search

7th - 12th Grade

20 Qs

Java: Chapter 20 Exam

Java: Chapter 20 Exam

9th - 12th Grade

20 Qs

CS Algorithms Quiz

CS Algorithms Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Victor Giurgia

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of the best case scenario for the QuickSort algorithm?

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a stable sorting algorithm?

Bubble Sort

Merge Sort

QuickSort

Insertion Sort

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a binary search algorithm, what must be true about the collection to be searched?

The collection must be in ascending order.

The collection must be in descending order.

The collection does not need to be sorted.

The collection must be a linked list.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following pseudocode do? ``` function factorial(n): if n == 0: return 1 else: return n * factorial(n-1) ```

Calculates the sum of all numbers up to n

Calculates the nth Fibonacci number

Calculates the factorial of n

Calculates n to the power of n

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which sorting algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order?

Selection Sort

Bubble Sort

Merge Sort

QuickSort

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of the linear search algorithm in an array of n elements?

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a characteristic of recursion?

It can only solve problems that are inherently iterative.

It breaks down a problem into smaller instances of the same problem.

It is always the most memory-efficient solution.

It cannot be used in sorting algorithms.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?