
Recursion

Quiz
•
Computers
•
University
•
Medium
FAKHRUL ZAKI
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Recursion Practice, Recursion Practice, Recursion Practice...

Quiz
•
10th Grade - University
10 questions
Compiler Parsing Techniques

Quiz
•
University
15 questions
Searching and Sorting

Quiz
•
University - Professi...
11 questions
Programming Techniques in C++ Final Review

Quiz
•
University
18 questions
Java Programming Quiz

Quiz
•
University
10 questions
Recursion Function Usage

Quiz
•
University
13 questions
Week6-ERD-2

Quiz
•
University
11 questions
Revision C class

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University