Search Header Logo

F2 - ALGO

Authored by hey heya

Information Technology (IT)

Vocational training

F2 - ALGO
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is recursion in the context of algorithms?

A process where a function calls another function repeatedly

A process where a function calls itself directly or indirectly

A technique that avoids using functions entirely

A method that exclusively uses loops to solve problems

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes the difference between iteration and recursion?

Recursion consumes less memory than iteration

Recursion is always faster than iteration

Iteration uses repetition structures while recursion uses selection structures

Iteration uses the stack while recursion does not

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary reason for defining a base case in a recursive function?

To reduce memory usage

To increase execution speed

To allow multiple functions to be called simultaneously

To avoid infinite loops

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the context of recursion, what is tail recursion?

When the recursive call happens at the beginning of the function

When the recursive call is the last operation performed in the function

When there are multiple recursive calls within the same function

When the function calls another function instead of itself

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following recursive function when n=3? int fun(int n){ if(n==1) return 1;else return 1 + fun(n-1);}

1

3

4

2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of an algorithm that checks each triple in an array of size N?

O(N)

O(log N)

O(N log N)

O(N³)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which asymptotic notation represents the worst-case scenario of an algorithm's running time?

Θ (Theta)

Ω (Omega)

β (Beta)

O (Big Oh)

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?