0% found this document useful (0 votes)
137 views3 pages

CS200 Algorithms and Data Structures: Quiz 7,8,9

The document contains three quizzes on algorithms and data structures topics. Quiz 7 covers priority queues, heaps, heap operations, and heapsort. Quiz 8 covers hashing concepts like collisions, load factor, and collision resolution schemes like linear probing, double hashing, and chaining. Quiz 9 covers graph terminology like subgraphs, cycles, connectivity, and properties of adjacency matrices in undirected graphs.

Uploaded by

Abhinav Tayade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views3 pages

CS200 Algorithms and Data Structures: Quiz 7,8,9

The document contains three quizzes on algorithms and data structures topics. Quiz 7 covers priority queues, heaps, heap operations, and heapsort. Quiz 8 covers hashing concepts like collisions, load factor, and collision resolution schemes like linear probing, double hashing, and chaining. Quiz 9 covers graph terminology like subgraphs, cycles, connectivity, and properties of adjacency matrices in undirected graphs.

Uploaded by

Abhinav Tayade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CS200

 Algorithms  and  Data  Structures:  Quiz  7,8,9                                                                                                                    


 
 
Problem 1 ~ 5: 1 pts each

QUIZ 7: Problem 1 ~ 5: 1 pts each


1) A priority queue orders its items by their ______.
a) position b) value c) priority value d) size
(C)

2) A heap is a ______.
a) binary tree b) binary search tree
c) full binary tree d) stack
(A)

3) In an array-based implementation of a heap, the heapDelete (delete and adjust)


operation is ______.
a) O(1) b) O(n) c) O(n2) d) O(log n)
(D)

4) The heapsort is ______ in the average case.


a) O(1) b) O(n) c) O(log n) d) O(n log n)
(D)

5) A sorted implementation of a table can insert a new item into any convenient
location.
(True/False)
(FALSE)

 
 
 
QUIZ 8: Problem 1 ~ 5: 1 pts each

1) The condition that occurs when a hash function maps two or more distinct search
keys into the same location is called a(n) ______.
a) disturbance
b) collision
c) rotation
d) congestion
(B)

2) ______ is a collision-resolution scheme that searches the hash table sequentially,


starting from the original location specified by the hash function, for an unoccupied
location.
a) Linear probing
b) Quadratic probing
c) Double hashing
d) Separate chaining
(A)

3)______ is a collision-resolution scheme that uses an array of linked lists as a hash


table.
a) Linear probing
b) Double hashing
c) Quadratic probing
d) Chaining
(D)

4) ______ is a collision-resolution scheme that searches the hash table for an


unoccupied location beginning with the original location that the hash function specifies
and continuing at increments of 12, 22, 32, and so on.
a) Linear probing
b) Double hashing
c) Quadratic probing
d) Separate chaining
(C)

5) The load factor of a hash table is calculated as ______.


a) table size + current number of table items
b) table size – current number of table items
c) current number of table items * table size
d) current number of table items / table size
(D)
CS200  Algorithms  and  Data  Structures:  Quiz  7,8,9                                                                                                                    
 
QUIZ 9: Problem 1 ~ 5: 1 pts each

6) A subset of a graph’s vertices and edges is known as a ______.


a) bar graph b) line graph c) subgraph d) circuit

(C)

7) All ______ begin and end at the same vertex and do not pass through any other vertices
more than once.
a) paths
b) simple paths
c) cycles
d) edges
(C)

8) A graph is ______ if each pair of distinct vertices has a path between them.
a) complete
b) disconnected
c) connected
d) full
(C)

9) All complete graphs are connected.


(True)

10) The adjacency matrix for an undirected graph is symmetrical.


(True/)

You might also like