Recursive Algorithms Quiz

Recursive Algorithms Quiz

11th - 12th Grade

16 Qs

quiz-placeholder

Similar activities

Unit 10 Recursion Review

Unit 10 Recursion Review

9th - 12th Grade

20 Qs

AP Computer Science Principles Units 1-4 Review

AP Computer Science Principles Units 1-4 Review

9th - 12th Grade

17 Qs

Recursion

Recursion

12th Grade

20 Qs

Java Recursion

Java Recursion

12th Grade

20 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Section 4A: Decompose the code using functions

Section 4A: Decompose the code using functions

12th Grade

14 Qs

Technical Quiz R2

Technical Quiz R2

12th Grade

15 Qs

Recursive Algorithms Quiz

Recursive Algorithms Quiz

Assessment

Quiz

Computers

11th - 12th Grade

Medium

Created by

Ben Taylor

Used 3+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary characteristic of a recursive routine?
It must have a stopping condition
It must be iterative
It must use global variables
It must have multiple return statements

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes recursion?
A method that only uses loops
A technique that avoids using functions
A method of solving problems by breaking them down into smaller instances
A way to store data in arrays

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when a recursive routine exceeds the maximum recursion depth?
It continues to execute
It produces incorrect results
It crashes with a stack overflow error
It automatically converts to an iterative routine

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the context of tree traversal, what does 'pre-order' mean?
Visit the root before its subtrees
Visit the root after its subtrees
Visit the root between its subtrees
Visit only the left subtree

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a characteristic of a recursive routine?
It must call itself
It must have a base case
It must use a stack
It must have a fixed number of calls

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the base case in a factorial based function?

1! = 1
0! = 1
n! = n x (n-1)! for n > 0
n! = 0 for n < 0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which traversal method outputs the root node after its subtrees have been processed?
Pre-order
In-order
Post-order
Level-order

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?