Recursive Algorithms

Quiz
•
Computers
•
12th Grade
•
Medium
R Woodruff
Used 69+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not essential in a recursive algorithm?
Base Case
Recursive Case
Contains a stack
Stop after a finite number of calls
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The sub routine calls itself within the algorithm
Base Case
Recursive Case
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The sub routine has a stopping condition that causes it to unwind
Base Case
Recursive Case
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A recursive algorithm must always contain a base case
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
RuntimeError: maximum recursion depth exceeded
: what does this mean
The program has crashed because it is taking too long
The program has crashed because it has run out of memory
The program has crashed because the user entered the wrong value
The program has crashed because a variable had the wrong variable name
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the base case?
n
n - 1
n = n + calcSum (n-1)
if n > 0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the best definition of a recursive method?
A method that iterates itself exactly 5 times.
A method that calls itself by name within the method.
A method that will never iterate infinitely.
A method that cannot be called more than once.
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Functional Programming Quiz 1 not check

Quiz
•
12th Grade
20 questions
Pemikiran Komputasional untuk Siswa Kelas 9

Quiz
•
9th Grade - University
10 questions
Recursia

Quiz
•
11th Grade - University
10 questions
Exploring Stacks in Python

Quiz
•
12th Grade
10 questions
Python Recursion

Quiz
•
12th Grade
14 questions
Section 4A: Decompose the code using functions

Quiz
•
12th Grade
20 questions
PP-T3-HL

Quiz
•
12th Grade
20 questions
19.1 Algorithms Cambridge iA 9618

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade