
2210 Midterm Prep

Quiz
•
Computers
•
University
•
Hard
Daniel Kaminsky
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Let T be a proper binary search tree with 5 nodes: a, b, c, d, e.
A postorder traversal of T visits the nodes in this order: a, c, b, e, d.
An inorder traversal of T visits the nodes in this order: a, d, c, e, b.
Which node is the right child of the root of T?
Hint: In tree T, the node d is the root.
a
b
c
d
e
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider a hash table of size 5 with the hash function h(k)=k mod 5 and secondary hash function h'(k) = 3 - (k mod 3). What are the contents of the table after inserting, in the given order, the following values into the table: 15, 25, 42, 38, and 57
15,57,25,42,38
15,38,25,42,57
15,42,25,57,38
15,25,42,38,57
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following algorithm. What does the algorithm compute?
The number of nodes in the tree
The number of descendants of r.
The height of the tree.
The number of internal nodes in the tree.
The number of nodes in the largest subtree of r.
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the time complexity of this function?
o(1)
n^4log(n^3)
n^1.6
n^4
n^4log(n)
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Three programs P1, P2, and P3 have time complexities f1(n), f2(n), and f3(n), respectively,
such that
• f1(n) is O(f2(n)),
• f2(n) is O(f1(n)),
• f1(n) is O(f3(n)), and
• f3(n) is not O(f1(n)).
Which of the following statements is true?
Program P1 is faster than P2 and P3 for very large size inputs.
Program P2 is faster than P1 and P3 for very large size inputs.
Program P3 is faster than P1 and P2 for very large inputs.
Program P3 is slower than P1 and P2 for very large inputs.
Program P1 must have the exact same running time as Program P2
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the time complexity of Process?
O(n)
O(n^2)
O(n^3)
O(logn)
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
1. According to the definition of order or ”big Oh”, which of the following is a correct proof for
2n^2 + 5 is O(n^2)
2n^2 + 5 < 3n^2 for all n > 1
2n^2 + 5 <= 4n^2 for all n>= 3
2n^2+5 <= 2n^2 + 6 for all n>=1
2n^2 + 5 <= 3n^2
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
OS Algorithm

Quiz
•
University
15 questions
C programming

Quiz
•
University
10 questions
QUIZ CIT4214 2410

Quiz
•
University
10 questions
JAVA III

Quiz
•
University
6 questions
Power Supply Quiz

Quiz
•
8th Grade - University
8 questions
Hierarchical Clustering

Quiz
•
University
11 questions
GKI: 9-12-probabilistic methods

Quiz
•
University
10 questions
KOD ARAHAN HTML 2

Quiz
•
1st Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University