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
23 questions
Data Structures and Algorithms Quiz - BATCH 1

Quiz
•
University
22 questions
Round 1: Hack The Quest

Quiz
•
8th Grade - University
25 questions
C - Data Structures (Unit 1 - QUIZ)

Quiz
•
University
26 questions
Graph Data Structure - 01

Quiz
•
University
25 questions
Neo Coding Round 1 Set 1

Quiz
•
University
25 questions
Stack and Queue

Quiz
•
University
25 questions
Design And Analysis of Algorithms

Quiz
•
University
25 questions
COCAT - DAA

Quiz
•
University - Professi...
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade