Search Header Logo

221 quiz questions exam 2 prep

Authored by Tommy Pham

Computers

University

Used 1+ times

221 quiz questions exam 2 prep
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the recurrence relation for the code below?

T(n) = T(n-1) + O(1) and T(1)=0

 T(n) = T(n-1) + O(n) and T(1)=0

T(n) = 2T(n-1) + O(1) and T(1)=0

T(n) = 2T(n-1) + O(n) and T(1)=0

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many recursive problems are solved by the Recur_fun(int n) for n=3?

5

8

7

6

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many recursive problems are solved for n>0?

n

2n

2n - 1

2n

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many recursive steps are required to reach the base case (the solutions to n=0)?

n

log2n

n/2

nlog2n

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How can you classify this algorithm using the big-O asymptotic notation?

O(n)

O(log2n)

O(2n)

O(n2)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Is this recursive function correct?

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of postfix form for algebraic expression?

The postfix form is used for find syntax errors of an algebraic expression.

The postfix form provides a more readable form of an algebraic expression.

The postfix form speeds up the evaluation process of an algebraic expression.

The postfix form decreases the arithmetic operations.

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?