Algorithm questions

Algorithm questions

12th Grade - University

20 Qs

quiz-placeholder

Similar activities

Berpikir Komputasional

Berpikir Komputasional

9th - 12th Grade

20 Qs

Operating System

Operating System

University

15 Qs

Mikropemproses dan Mikropengawal

Mikropemproses dan Mikropengawal

12th Grade - University

15 Qs

Data structure test1

Data structure test1

12th Grade

20 Qs

Review Quiz (Chapter 3&4)

Review Quiz (Chapter 3&4)

University

20 Qs

Microcontrolere Noțiuni generale. Structura internă

Microcontrolere Noțiuni generale. Structura internă

KG - 12th Grade

16 Qs

TEST1.PY

TEST1.PY

10th Grade - University

20 Qs

Access bài 7,8

Access bài 7,8

12th Grade

20 Qs

Algorithm questions

Algorithm questions

Assessment

Quiz

Computers

12th Grade - University

Practice Problem

Hard

Created by

Toby Adams

Used 78+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider this list of numbers: 9 3 6 8 4 7. An algorithm compares 9 and 3 followed by 9 and 6 followed by 9 and 8. Which algorithm is being described?

Bubble sort
Insertion sort
Merge sort
Binary search

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Comparing a bubble sort to the insertion sort, which is the better algorithm in terms of time complexity on average?

They are both similar
Bubble sort
Insertion sort
It is not possible to determine

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider this list of numbers: 3 4 6 7 8 9. If the number 9 was to be found using a linear search, how many comparisons need to be made?

6
3
8
4

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the main disadvantage of a binary search compared to a linear search?

It requires the data to be in order
It requires more memory
It does not execute as quickly with larger data sets
Not all CPUs are capable of executing the algorithm

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

An advantage of pseudocode is that:

It is a convenient way of designing algorithms to aid thinking logically
Algorithms are represented graphically
There are standards for representing syntax
It is easier to see where there are logic errors in a program

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The recursive algorithm to perform a post-order traversal of a binary tree can be described simply as:

Left pointer, right pointer, node
Node, left pointer, right pointer
Left pointer, node, right pointer
Right pointer, left pointer, node

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The recursive algorithm to perform a pre-order traversal of a binary tree can be described simply as:

Node, left pointer, right pointer
Left pointer, node, right pointer
Left pointer, right pointer, node
Right pointer, left pointer, node

Create a free account and access millions of resources

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?