Deck 18: Recursion

ملء الشاشة (f)
exit full mode
سؤال
The current method executing is always the method whose activation record is:

A)at the bottom of the stack.
B)at the top of the stack.
C)never placed on the stack.
D)second from the top of the stack,just below the previous method call.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Recursion often is preferable to iteration because

A)it is faster.
B)it requires less memory.
C)it models the problem more logically.
D)All of the above.
سؤال
In recursive backtracking,if one set of recursive calls does not result in a solution to the problem,what happens?

A)The program returns to a previous decision point and makes a different decision.
B)The program backs up to the previous decision point and throws an exception.
C)The program continues,with unexpected results.
D)The program backs up to the original method call.
سؤال
The operands of an operator are evaluated:

A)from right to left.
B)from left to right.
C)at the same time.
D)in an order that is specific to each operator.
سؤال
The recursion step should:

A)check for the base case.
B)call a fresh copy of the recursive method to work on a smaller problem.
C)make two calls to the recursive method.
D)iterate until it reaches a termination condition.
سؤال
After a fractal's pattern is applied several times,the shape of the fractal will generally become:

A)disjointed and less detailed.
B)stabilized and more detailed.
C)identical to the original fractal.
D)None of the above.
سؤال
Recursion is often less efficient than iteration because:

A)it can cause an explosion of method calls.
B)it is not as intuitive.
C)recursive methods are harder to debug.
D)recursive methods take longer to program.
سؤال
When the recursion step executes:

A)this is known as indirect recursion.
B)all of the computer's processes halt until the recursion step has completed executing.
C)the original call to the method is still active.
D)All of the above.
سؤال
All of the following are true for both recursion and iteration except:

A)they have a base case.
B)they can cause infinite loops or infinite recursion.
C)they are based on a control statement.
D)both gradually approach termination.
سؤال
When a recursive method is called to solve a problem,the method actually is capable of solving only the simplest case(s),or .

A)base case(s).
B)base step(s).
C)recursive call(s).
D)recursion step(s).
سؤال
Each time a fractal's pattern is applied to it,the fractal is said to be at a new:

A)level.
B)depth.
C)order.
D)All of the above.
سؤال
Fractals that yield an exact copy of the original when a portion of the original image is magnified are called .

A)strictly self similar fractals.
B)Koch Curve fractals.
C)similar fractals.
D)mirror fractals.
سؤال
A recursive method .

A)is a method that calls itself.
B)can be called directly.
C)can be called indirectly through another method.
D)All of the above.
سؤال
The number of calls to recursively calculate the Fibonacci value of 7 is:

A)7
B)13
C)41
D)39
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/14
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 18: Recursion
1
The current method executing is always the method whose activation record is:

A)at the bottom of the stack.
B)at the top of the stack.
C)never placed on the stack.
D)second from the top of the stack,just below the previous method call.
B
2
Recursion often is preferable to iteration because

A)it is faster.
B)it requires less memory.
C)it models the problem more logically.
D)All of the above.
C
3
In recursive backtracking,if one set of recursive calls does not result in a solution to the problem,what happens?

A)The program returns to a previous decision point and makes a different decision.
B)The program backs up to the previous decision point and throws an exception.
C)The program continues,with unexpected results.
D)The program backs up to the original method call.
A
4
The operands of an operator are evaluated:

A)from right to left.
B)from left to right.
C)at the same time.
D)in an order that is specific to each operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
5
The recursion step should:

A)check for the base case.
B)call a fresh copy of the recursive method to work on a smaller problem.
C)make two calls to the recursive method.
D)iterate until it reaches a termination condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
6
After a fractal's pattern is applied several times,the shape of the fractal will generally become:

A)disjointed and less detailed.
B)stabilized and more detailed.
C)identical to the original fractal.
D)None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
7
Recursion is often less efficient than iteration because:

A)it can cause an explosion of method calls.
B)it is not as intuitive.
C)recursive methods are harder to debug.
D)recursive methods take longer to program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
8
When the recursion step executes:

A)this is known as indirect recursion.
B)all of the computer's processes halt until the recursion step has completed executing.
C)the original call to the method is still active.
D)All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
9
All of the following are true for both recursion and iteration except:

A)they have a base case.
B)they can cause infinite loops or infinite recursion.
C)they are based on a control statement.
D)both gradually approach termination.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
10
When a recursive method is called to solve a problem,the method actually is capable of solving only the simplest case(s),or .

A)base case(s).
B)base step(s).
C)recursive call(s).
D)recursion step(s).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
11
Each time a fractal's pattern is applied to it,the fractal is said to be at a new:

A)level.
B)depth.
C)order.
D)All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
12
Fractals that yield an exact copy of the original when a portion of the original image is magnified are called .

A)strictly self similar fractals.
B)Koch Curve fractals.
C)similar fractals.
D)mirror fractals.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
13
A recursive method .

A)is a method that calls itself.
B)can be called directly.
C)can be called indirectly through another method.
D)All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
14
The number of calls to recursively calculate the Fibonacci value of 7 is:

A)7
B)13
C)41
D)39
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 14 في هذه المجموعة.