
Recursion
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
FAKHRUL ZAKI
Used 1+ times
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is recursion in programming?
A method that calls itself
A method that runs in a loop
A method that sorts data
A method that uses arrays
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a base case in recursion?
A case that runs indefinitely
A case that uses loops
A case that does not call itself
A case that calls itself multiple times
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the binary search algorithm do?
Reverses a list
Counts the number of items
Sorts a list of items
Finds an item in a sorted list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the factorial method, what is the base case?
1! = 1
0! = 1
N! = N + (N-1)!
N! = N * (N-1)!
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of factorial(3)?
2
3
9
6
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the Fibonacci sequence?
A sequence of odd numbers
A sequence of prime numbers
A sequence where each number is the sum of the two preceding ones
A sequence of even numbers
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if a recursive method does not have a base case?
It will sort the data
It will return zero
It will run successfully
It may cause a stack overflow error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Cuestionario Steve Jobs
Quiz
•
12th Grade - University
15 questions
Chapter 8 - Memory Management Strategies
Quiz
•
University
10 questions
MATEMÁTICA III
Quiz
•
University
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
