Enumeration and Recursion

Enumeration and Recursion

11th Grade - University

12 Qs

quiz-placeholder

Similar activities

FSA,DFA dan NFA

FSA,DFA dan NFA

University

15 Qs

Penilaian Harian-1, Pemrograman Berorientasi Objek (PBO)

Penilaian Harian-1, Pemrograman Berorientasi Objek (PBO)

12th Grade

10 Qs

Node.js

Node.js

University

10 Qs

CS Open House

CS Open House

University

10 Qs

GEMATMW - Cryptography

GEMATMW - Cryptography

University - Professional Development

16 Qs

Chapter 2: Input Device

Chapter 2: Input Device

12th Grade - University

12 Qs

Fun with Computer Architecture

Fun with Computer Architecture

University

15 Qs

3rd week g9 summative

3rd week g9 summative

7th - 12th Grade

15 Qs

Enumeration and Recursion

Enumeration and Recursion

Assessment

Quiz

Computers

11th Grade - University

Practice Problem

Medium

Created by

Carol Luce

Used 23+ times

FREE Resource

AI

Enhance your content in a minute

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

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do you need to use a base case?

So that the code loops forever

So that the code does not loop forever

To exit the recursive function

To call another function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the best definition of a recursive method?

A method that iterates itself exactly 5 times.

A method that invokes itself by name within the method.

A method that will never iterate infinitely.

A method that cannot be called more than once.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A 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

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

Which of the following problems MAY 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

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Recursion is similar to which of the following?

if-else

switch-case

loops

none of the above

7.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following algorithms use recursion?

Linear Search

Binary Search

Merge sort

Insertion sort

Create a free account and access millions of resources

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?