Deck 7: Iterators
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/32
العب
ملء الشاشة (f)
Deck 7: Iterators
1
Any recursive definition must have a non-recursive part, called the ___________, which permits the recursion to eventually end.
A) base case
B) foundation
C) primary case
D) first case
A) base case
B) foundation
C) primary case
D) first case
base case
2
Recursion is a programming technique in which a ________ calls itself.
A) program
B) method
C) variable
D) parameter
A) program
B) method
C) variable
D) parameter
method
3
____________ problems and formulas are often expressed recursively.
A) Business
B) Programmatic
C) Variable
D) Mathematical
A) Business
B) Programmatic
C) Variable
D) Mathematical
Mathematical
4
Each recursive call to a method creates new __________ and __________.
A) Local variables
B) Parameters
C) Methods
D) A and B
A) Local variables
B) Parameters
C) Methods
D) A and B
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
5
A careful _______ of recursive processing can provide insight into the way it is used to solve a problem.
A) review
B) trace
C) observation
D) use
A) review
B) trace
C) observation
D) use
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
6
Recursion is the most elegant and appropriate way to solve ________ problems, but for others it is less intuitive than an iterative solution.
A) some
B) most
C) all
D) none of the above
A) some
B) most
C) all
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
7
The order of a recursive algorithm can be determined using techniques similar to analyzing ______ processing.
A) programmatic
B) variable
C) iterative
D) interface
A) programmatic
B) variable
C) iterative
D) interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
8
The Towers of Hanoi solution has ___________ complexity, which is very inefficient. Yet the implementation of the solution is incredibly short and elegant.
A) quadratic
B) linear
C) exponential
D) none of the above
A) quadratic
B) linear
C) exponential
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
9
Recursion is a programming technique in which a method calls ______.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
10
Any recursive definition must have a ______ part, called the base case, which permits the recursion to eventually end.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
11
Mathematical problems and formulas are often expressed ______.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
12
Each recursive call to a method creates ______ local variables and parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
13
The order of a recursive algorithm can be determined using techniques similar to analyzing ______ processing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
14
The Towers of Hanoi solution has exponential complexity, which is very inefficient. Yet the implementation of the solution is incredibly short and ______.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
15
If method m1 invokes m2 which invokes m3 which invokes m1 again, then this is an example of ______
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
16
A recursive definition without a base-case will lead to ______.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
17
Recursion is a programming technique in which a method calls itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
18
If a problem can be solved with iteration, it cannot be solved with recursion
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
19
Any recursive definition must have a nonrecursive part, called the base case, which permits the recursion to eventually end.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
20
Mathematical problems and formulas are never expressed recursively.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
21
Each recursive call to a method uses the same local variables and parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
22
A careful trace of recursive processing can provide insight into the way it is used to solve a problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
23
Recursion is the most elegant and appropriate way to solve some problems, but for others it is less intuitive than an iterative solution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
24
The order of a recursive algorithm can be determined using techniques similar to analyzing iterative processing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
25
The Towers of Hanoi solution has quadratic complexity, which is very inefficient. Yet the implementation of the solution is incredibly short and elegant.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
26
One of the reasons recursion is so elegant and effective is that it creates a new set of local variables and parameters with each call.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is the output of the following program?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is infinite recursion?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
29
When is a base case needed for recursive processing?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
30
When should recursion be avoided?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
31
What is indirect recursion?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
32
Explain the general approach to solving the Towers of Hanoi puzzle. How does it relate to recursion?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck