Deck 15: Recursion
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/20
العب
ملء الشاشة (f)
Deck 15: Recursion
1
The Towers of Hanoi is a mathematical game that is often used in computer science textbooks to illustrate the power of recursion.
True
2
This occurs when method A calls method B, which in turn calls method A.
A) dynamic recursion
B) linear recursion
C) direct recursion
D) indirect recursion
A) dynamic recursion
B) linear recursion
C) direct recursion
D) indirect recursion
D
3
Recursion is never absolutely required to solve a problem.
True
4
A problem can be solved recursively if it can be broken down into successive smaller problems that are identical to the overall problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
5
Without a base case, a recursive method will call itself only once and stop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
6
When recursive methods directly call themselves, it is known as this.
A) direct recursion
B) indirect recursion
C) basic recursion
D) static recursion
A) direct recursion
B) indirect recursion
C) basic recursion
D) static recursion
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
7
The number of times that a method calls itself is known as
A) the call count.
B) the cyclic identity.
C) the method heap.
D) the depth of recursion.
A) the call count.
B) the cyclic identity.
C) the method heap.
D) the depth of recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
8
The actions performed by the JVM that take place with each method call are sometimes referred to as this.
A) overhead
B) allocation
C) overflow
D) retention
A) overhead
B) allocation
C) overflow
D) retention
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
9
A recursive method can have no more than one base case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
10
Any problem that can be solved recursively can also be solved iteratively, with a loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
11
The recursive case does not require recursion, so it stops the chain of recursive calls.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
12
A method that calls itself is a ________ method.
A) recursive
B) redundant
C) binary
D) derived
A) recursive
B) redundant
C) binary
D) derived
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
13
The recursive binary search algorithm is a good example of repeatedly breaking a problem down into smaller pieces until it is solved.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
14
In the ________, we must always reduce the problem to a smaller version of the original problem.
A) base case
B) partition case
C) lessening case
D) recursive case
A) base case
B) partition case
C) lessening case
D) recursive case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of the following problems can be solved recursively?
A) greatest common denominator
B) towers of Hanoi
C) binary search
D) All of the Above
A) greatest common denominator
B) towers of Hanoi
C) binary search
D) All of the Above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
16
Like a loop, a recursive method must have which of the following?
A) a statement that increments the control variable
B) a control variable initialized to a starting value
C) some way to control the number of times it repeats
D) All of the above
A) a statement that increments the control variable
B) a control variable initialized to a starting value
C) some way to control the number of times it repeats
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ________ is at least one case in which a problem can be solved without recursion.
A) recursive case
B) base case
C) termination point
D) point of absolution
A) recursive case
B) base case
C) termination point
D) point of absolution
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
18
Recursion can be a powerful tool for solving repetitive problems and is an important topic in upper-level computer science courses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
19
Whereas a recursive algorithm might result in faster execution time, the programmer might be able to design an iterative algorithm faster.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
20
A method is called from the main method for the first time. It then calls itself seven times. What is the depth of recursion?
A) 1
B) 7
C) 8
D) 6
A) 1
B) 7
C) 8
D) 6
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck