What is the recurrence relation for the code below?
221 quiz questions exam 2 prep

Quiz
•
Computers
•
University
•
Hard
Tommy Pham
Used 1+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
How many recursive problems are solved for n>0?
n
2n
2n - 1
2n
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
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
Similar Resources on Quizizz
30 questions
BUG-OFF

Quiz
•
University
31 questions
Chapt 14

Quiz
•
University
28 questions
Computer Science quiz

Quiz
•
11th Grade - University
21 questions
Sorting algorithms I

Quiz
•
University
25 questions
CA mcq

Quiz
•
University
25 questions
Design And Analysis of Algorithms

Quiz
•
University
25 questions
Technical quiz(Medium-Level)

Quiz
•
University
25 questions
QUIZ

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade