Algorithm questions

Algorithm questions

12th Grade - University

20 Qs

quiz-placeholder

Similar activities

AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

10th - 12th Grade

15 Qs

Practice for AP Java Quiz #13 Sorting

Practice for AP Java Quiz #13 Sorting

9th - 12th Grade

20 Qs

Quiz 1_DSA

Quiz 1_DSA

University

20 Qs

Data Structures: Placement Preparations

Data Structures: Placement Preparations

University

25 Qs

19.1 Algorithms Cambridge iA 9618

19.1 Algorithms Cambridge iA 9618

12th Grade

20 Qs

Algorithms

Algorithms

3rd - 12th Grade

15 Qs

Data Structures 1

Data Structures 1

University

25 Qs

Data Structure

Data Structure

University

20 Qs

Algorithm questions

Algorithm questions

Assessment

Quiz

Computers

12th Grade - University

Hard

Created by

Toby Adams

Used 78+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?