Algorithm questions

Algorithm questions

12th Grade - University

20 Qs

quiz-placeholder

Similar activities

Linked List and Arrays in JAVA

Linked List and Arrays in JAVA

University

16 Qs

DS - Linked List - S1

DS - Linked List - S1

University

16 Qs

DATA STRUCTURES QUIZ-1

DATA STRUCTURES QUIZ-1

University

23 Qs

Linked list 1

Linked list 1

University

20 Qs

DSAA Quiz

DSAA Quiz

University

15 Qs

Heaps

Heaps

University

15 Qs

iGCSE Computer Science: Problem Solving

iGCSE Computer Science: Problem Solving

9th - 12th Grade

20 Qs

ADAweek0 Intl

ADAweek0 Intl

University

15 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?