221 quiz questions exam 2 prep

221 quiz questions exam 2 prep

University

26 Qs

quiz-placeholder

Similar activities

EC8393_FDS_MODEL_EXAM_1_PART A

EC8393_FDS_MODEL_EXAM_1_PART A

University

30 Qs

CA mcq

CA mcq

University

25 Qs

Technical quiz(Medium-Level)

Technical quiz(Medium-Level)

University

25 Qs

DSA Quiz Finals

DSA Quiz Finals

University

30 Qs

Chapt 14

Chapt 14

University

31 Qs

Computer Science quiz

Computer Science quiz

11th Grade - University

28 Qs

Algorithms are not magic - AQA A Level Computer Science

Algorithms are not magic - AQA A Level Computer Science

8th Grade - University

25 Qs

ICT 1 (H1H2)

ICT 1 (H1H2)

University

25 Qs

221 quiz questions exam 2 prep

221 quiz questions exam 2 prep

Assessment

Quiz

Computers

University

Hard

Created by

Tommy Pham

Used 1+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?