1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What does a stack frame contain in programming?
The values of non-static local variables and parameters.
What is recursion in programming and mathematics?
A tool used for solving problems by having a function call itself.
Are recursive methods always more efficient than non-recursive methods?
No, recursive methods are not always more efficient.
In recursive mathematical definitions, must all recursive references be on larger values?
No, they will not always be on larger values as eventually it reaches the base case.
What is placed on the run-time stack whenever a method is called?
A stack frame (also known as a stack allocation record).
What is a key characteristic of a correctly written recursive Java method?
It typically has at least one base case.
What is tail recursion?
When the recursive call is the last operation of a method.
Why is recursion often used in programming?
Because it is easier for humans to think with it.
Why is Select Sort considered inefficient?
Because it does not exploit already sorted sequences.
Can SelectionSort be implemented recursively?
Yes, SelectionSort can be implemented recursively.
Is the recursive Fibonacci series always implemented with two recursion calls?
No, it is not always implemented with two calls; there exist versions with one call.
What are the cost bounds for Binary Search?
Given by O(log n), specifically some_constant*log(n).