Search Header Logo

4.1 Recursion (Java)

Authored by Valentina Hideg

Computers

12th Grade

Used 4+ times

4.1 Recursion (Java)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

___________ is when the recursive method stops calling itself.

Base case

Worst Case

Best Case

Simple Case

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The program may run out of memory in a

non-recursive function call

recursive function call

condition when too many variables are declared

none of the above

3.

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.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following problems can be solved using recursion?

Finding nth number of the Fibonacci sequence

Finding the factorial of a number

Finding the length of a string

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would happen if the base case is not defined in the recursive method?

Stack Overflow

Stack Underflow

Program Crashes

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the recursive call, the argument should grow/shrink towards the ________.

base case

end

next recursive call

none of the above

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

What is returned as a result of the call mystery(4,6)?

2

3

4

1

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?