
Quiz 14 Algorithms
Authored by ks wong
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The sub routine calls itself within the algorithm
Base Case
Recursive Case
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A recursive function is
A function that calls other functions in a recursive way.
Any function that calls itself is called recursive
A function that has a base case or termination condition
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Name the condition at which the recursive method will stop calling itself.
Base case
Worst Case
Best Case
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following condition is true?
Recursion is always better than iteration.
Recursion uses more memory as compared to iteration.
Recursion uses less memory as compared to iteration.
Iteration is always better and simpler than recursion.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Recursion is similar to which of the following?
if-else
switch-case
loops
none of the above
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the returned value of recmethod(5)?
68
70
75
82
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is printed as a result of the call stri("COMPSCI")?
COMPSCI
COMPSC
COMPS
COMP
COM
CO
C
COMPSCI
OMPSCI
MPSCI
PSCI
SCI
CI
I
CO
COM
COMP
COMPS
COMPSC
COMPSCI
C
CO
COM
COMP
COMPS
COMPSC
COMPSCI
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?