Deck 9: Recursion

ملء الشاشة (f)
exit full mode
سؤال
Like a loop, a recursive method must have a way to control the number of times it ___________________.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The number of times a method calls itself is known as the:

A) depth of recursion
B) depth of repetition
C) length of recursion
D) number of repetitions
E) None of these
سؤال
Recursion can be a powerful tool for solving repetitive problems.
سؤال
What is the term for the aspect of a problem that is reduced to a smaller version of the original problem?

A) base case
B) ending case
C) final case
D) recursive case
E) None of these
سؤال
Any problem that can be solved with recursion can also be solved with a loop.
سؤال
A problem can be solved with recursion if

A) it can be broken down into any set of smaller problems
B) it can be broken down into at least three different subparts
C) it can be broken down into successive smaller problems that are identical to the overall problem
D) it can be solved by any method
E) None of these
سؤال
The base case is the aspect of a problem that can be solved without recursion.
سؤال
A recursive method is a method that calls itself.
سؤال
A(n) ___________________ method is a method that calls itself.
سؤال
Any mathematical problem can be solved with recursion.
سؤال
The number of times a method calls itself is known as the depth of iteration.
سؤال
Like a loop, a recursive method must have some way to control the number of times it repeats.
سؤال
Which of the following would be a base case for a summation algorithm (the sum of the numbers from 0 to n)?

A) If n = 0 then summation(n) = 0
B) if n > 0 then summation(n) = 5
C) If n > 0 then summation(n) = getValue(n)
D) If n > 0 then summation(n) = n + summation(n-1)
E) None of these
سؤال
What is the term for the aspect of a recursive problem that can be solved without recursion?

A) base case
B) ending case
C) final case
D) recursive case
E) None of these
سؤال
The recursive case of a problem is solved without recursion.
سؤال
When a recursive method ends, control of the program returns to the point:

A) after the recursive method call
B) before the recursive method call
C) before the next method
D) after the next method
E) None of these
سؤال
The following is an example of a base case for a summation algorithm (the sum of the numbers from 0 to n): If n > 0 then summation (n) = n + summation (n-1)
سؤال
The depth of recursion for a method that calls itself five times is six.
سؤال
Which of the following would be a recursive case for a summation algorithm (the sum of the numbers from 0 to n)?

A) If n = 0 then summation(n) = 0
B) if n > 0 then summation(n) = 5
C) If n > 0 then summation(n) = getValue(n)
D) If n > 0 then summation(n) = n + summation(n-1)
E) None of these
سؤال
A method that calls itself is referred to as a(n):

A) depth method
B) iterative method
C) recursive method
D) repetitive method
E) None of these
سؤال
The following is an example of a(n) ___________________ case for a summation algorithm (the sum of the numbers from 0 to n): If n = 0 then summation(n) = 0
سؤال
Usually, a problem is reduced by making the value of a(n) ___________________ smaller with each recursive call.
سؤال
The following is an example of a(n) ___________________ case for a summation algorithm (the sum of the numbers from 0 to n): If n > 0 then summation(n) = n + summation(n-1)
سؤال
The number of times that a method calls itself is known as the ___________________ of recursion.
سؤال
The ___________________ case the problem is solved without recursion.
سؤال
In the ___________________ case the problem is reduced to a smaller version of the original problem.
سؤال
Any problem that can be solved with recursion can also be solved with a(n)___________________.
سؤال
A problem can be solved with ___________________ if it can be broken down into successive smaller problems that are identical to the overall problem.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/28
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Recursion
1
Like a loop, a recursive method must have a way to control the number of times it ___________________.
repeats
2
The number of times a method calls itself is known as the:

A) depth of recursion
B) depth of repetition
C) length of recursion
D) number of repetitions
E) None of these
A
3
Recursion can be a powerful tool for solving repetitive problems.
True
4
What is the term for the aspect of a problem that is reduced to a smaller version of the original problem?

A) base case
B) ending case
C) final case
D) recursive case
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
5
Any problem that can be solved with recursion can also be solved with a loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
6
A problem can be solved with recursion if

A) it can be broken down into any set of smaller problems
B) it can be broken down into at least three different subparts
C) it can be broken down into successive smaller problems that are identical to the overall problem
D) it can be solved by any method
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
7
The base case is the aspect of a problem that can be solved without recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
8
A recursive method is a method that calls itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
9
A(n) ___________________ method is a method that calls itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
10
Any mathematical problem can be solved with recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
11
The number of times a method calls itself is known as the depth of iteration.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
12
Like a loop, a recursive method must have some way to control the number of times it repeats.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of the following would be a base case for a summation algorithm (the sum of the numbers from 0 to n)?

A) If n = 0 then summation(n) = 0
B) if n > 0 then summation(n) = 5
C) If n > 0 then summation(n) = getValue(n)
D) If n > 0 then summation(n) = n + summation(n-1)
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
14
What is the term for the aspect of a recursive problem that can be solved without recursion?

A) base case
B) ending case
C) final case
D) recursive case
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
15
The recursive case of a problem is solved without recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
16
When a recursive method ends, control of the program returns to the point:

A) after the recursive method call
B) before the recursive method call
C) before the next method
D) after the next method
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
17
The following is an example of a base case for a summation algorithm (the sum of the numbers from 0 to n): If n > 0 then summation (n) = n + summation (n-1)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
18
The depth of recursion for a method that calls itself five times is six.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of the following would be a recursive case for a summation algorithm (the sum of the numbers from 0 to n)?

A) If n = 0 then summation(n) = 0
B) if n > 0 then summation(n) = 5
C) If n > 0 then summation(n) = getValue(n)
D) If n > 0 then summation(n) = n + summation(n-1)
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
20
A method that calls itself is referred to as a(n):

A) depth method
B) iterative method
C) recursive method
D) repetitive method
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
21
The following is an example of a(n) ___________________ case for a summation algorithm (the sum of the numbers from 0 to n): If n = 0 then summation(n) = 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
22
Usually, a problem is reduced by making the value of a(n) ___________________ smaller with each recursive call.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
23
The following is an example of a(n) ___________________ case for a summation algorithm (the sum of the numbers from 0 to n): If n > 0 then summation(n) = n + summation(n-1)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
24
The number of times that a method calls itself is known as the ___________________ of recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
25
The ___________________ case the problem is solved without recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
26
In the ___________________ case the problem is reduced to a smaller version of the original problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
27
Any problem that can be solved with recursion can also be solved with a(n)___________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
28
A problem can be solved with ___________________ if it can be broken down into successive smaller problems that are identical to the overall problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 28 في هذه المجموعة.