Recursion

Recursion

University

13 Qs

quiz-placeholder

Similar activities

Tes Awal Modul 5

Tes Awal Modul 5

University

10 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

E-Commerce

E-Commerce

University - Professional Development

16 Qs

DCN5511: Chapter 5 - 7

DCN5511: Chapter 5 - 7

University

15 Qs

Structured/Traditional SDM

Structured/Traditional SDM

University

9 Qs

Process modeling

Process modeling

University

10 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

computer Networks

computer Networks

University

10 Qs

Recursion

Recursion

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

FAKHRUL ZAKI

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is recursion in programming?

A method that calls itself

A method that runs in a loop

A method that sorts data

A method that uses arrays

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a base case in recursion?

A case that runs indefinitely

A case that uses loops

A case that does not call itself

A case that calls itself multiple times

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the binary search algorithm do?

Reverses a list

Counts the number of items

Sorts a list of items

Finds an item in a sorted list

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the factorial method, what is the base case?

1! = 1

0! = 1

N! = N + (N-1)!

N! = N * (N-1)!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of factorial(3)?

2

3

9

6

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Fibonacci sequence?

A sequence of odd numbers

A sequence of prime numbers

A sequence where each number is the sum of the two preceding ones

A sequence of even numbers

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a recursive method does not have a base case?

It will sort the data

It will return zero

It will run successfully

It may cause a stack overflow error

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?

Discover more resources for Computers