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
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
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 Wayground
25 questions
Data Structures 1

Quiz
•
University
25 questions
COCAT - DAA

Quiz
•
University - Professi...
23 questions
Data Structures and Algorithms Quiz - BATCH 1

Quiz
•
University
22 questions
Round 1: Hack The Quest

Quiz
•
8th Grade - University
25 questions
Code Sprint

Quiz
•
University
21 questions
DSC UNIT 6

Quiz
•
University
25 questions
Stack and Queue

Quiz
•
University
25 questions
Design And Analysis of Algorithms

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade