What is recursion?

AP Computer Science A: Recursion Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Shane Andrus
Used 2+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A method that uses loops
A method that calls itself
A method that returns a value
A method that calls another method
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base case in recursion?
The simplest version of the recursive process
The most complex version of the recursive process
The point where the problem cannot be reduced any further
The point where the problem starts
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a base case in recursion?
To return a value
To make the problem more complex
To call another method
To halt the recursion
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What do recursive methods contain?
Only recursive calls
Only base cases
No base cases or recursive calls
At least one base case and at least one recursive call
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What do parameter values capture in a recursive process?
The result of the recursive process
The progress of a loop
The progress of the recursive process
The base case of the recursive process
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can any recursive solution be replicated through the use of an iterative approach?
It depends on the problem
Sometimes
No
Yes
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What can recursion be used to traverse?
String, array, and ArrayList objects
Only String objects
Only ArrayList objects
Only array objects
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will the sumArray method be called for an array of length 5?
6
7
5
8
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the generic formula for summing numbers using recursion?
sum(n) = n - sum(n - 1)
sum(n) = n / sum(n - 1)
sum(n) = n * sum(n - 1)
sum(n) = n + sum(n - 1)
Similar Resources on Quizizz
10 questions
Recursive Functions in Python

Quiz
•
12th Grade
10 questions
Recursion Contest

Quiz
•
10th - 12th Grade
10 questions
DATA STRUCTURES

Quiz
•
12th Grade
10 questions
8.2 Arrays Cambridge IGCSE 0478

Quiz
•
10th Grade - University
10 questions
Recursive C++ Quiz

Quiz
•
12th Grade
12 questions
Enumeration and Recursion

Quiz
•
11th Grade - University
7 questions
Recursion Computer Science Quiz

Quiz
•
12th Grade
14 questions
Python User Defined Functions

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University