Exam 12: Recursion
Exam 1: Introduction to Computers and Programming39 Questions
Exam 2: Input, Processing, and Output40 Questions
Exam 3: Decision Structures and Boolean Logic40 Questions
Exam 4: Repetition Structures41 Questions
Exam 5: Functions66 Questions
Exam 6: Files and Exceptions40 Questions
Exam 7: Lists and Tuples40 Questions
Exam 8: More About Strings37 Questions
Exam 9: Dictionaries and Sets39 Questions
Exam 10: Classes and Object-Oriented Programming38 Questions
Exam 11: Inheritance36 Questions
Exam 12: Recursion35 Questions
Exam 13: Gui Programming42 Questions
Select questions type
Some problems are more __________ solved with recursion than with a loop.
Free
(Short Answer)
4.9/5
(65)
Correct Answer:
easily
Recursive algorithms are always more concise and efficient than iterative algorithms.
Free
(True/False)
4.8/5
(82)
Correct Answer:
False
Each time a function is called,the system incurs __________ that is not necessary with a loop.
Free
(Short Answer)
4.8/5
(69)
Correct Answer:
overhead
A function is called from the main function and then it calls itself five times.
The depth of recursion is __________.
(Short Answer)
4.8/5
(77)
In a recursive solution,if the problem cannot be solved now,then a recursive function reduces it to a smaller but similar problem and
(Multiple Choice)
4.8/5
(65)
The majority of repetitive programming tasks are best done with ___________.
(Short Answer)
5.0/5
(77)
If,in a recursive solution,function A calls function B which calls function C,this is called __________ recursion.
(Multiple Choice)
5.0/5
(69)
A solution using a(n)__________ is usually more evident than a recursive solution.
(Short Answer)
4.9/5
(74)
What is the second step to take in order to apply a recursive approach?
(Multiple Choice)
4.9/5
(78)
All the cases of a recursive solution other than the base case are called the __________ case.
(Short Answer)
4.8/5
(90)
Each time a function is called in a recursive solution,the system incurs overhead that is not incurred with a loop.
(True/False)
4.9/5
(81)
If a problem can be solved immediately without recursion,then the recursive function
(Multiple Choice)
4.7/5
(88)
If a recursive solution is evident for a particular problem,and if the recursive algorithm does not slow system performance by an intolerable amount,then recursion would probably be a good design choice.
(True/False)
4.9/5
(82)
A recursive function includes __________ which are not necessary in a loop structure.
(Multiple Choice)
4.8/5
(83)
A function is called from the main function for the first time and then calls itself seven times. What is the depth of recursion?
(Multiple Choice)
4.9/5
(90)
A problem can be solved with recursion if it can be broken down into __________ problems.
(Multiple Choice)
4.9/5
(82)
A recursive function must have some way to control the number of times it repeats.
(True/False)
4.9/5
(89)
A problem can normally be solved with recursion if it can be broken down into smaller problems that are identical in structure to the overall problem.
(True/False)
4.9/5
(88)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)