2025 DS Example Final Exam Updated
2025 DS Example Final Exam Updated
(Example)
Name:
NYU NetID:
--------------------------------------------------------------------
A. Please read the following questions and respond with either T or F.
(Correct answers earn +2 points each, incorrect responses result in -1
point, and if left unanswered, no points will be awarded.)
1. All key values in each node of Binary Search Tree (BST) are unique.
( )
2. Time complexity of search, delete and insert operations of BST is
always O(log n). ( )
3. In AVL Tree, the Balance Factor (BF) at each node is. -1, 0 and 1 ( )
4. In AVL Tree, there are three generalized imbalanced cases ( )
5. A "high load factor" is one of the main causes of hash collisions. ( )
6. When using Chaining as collision resolution, the size of hash table
can be changed ( )
7. In a directed graph, the in-degree and out-degree of a vertex are
always equal. ( )
8. A connected graph with 𝑛 vertices and 𝑛 − 1 edges is always a tree.
( )
9. Path of Graph is a sequence of adjacent vertices from vertex u to
vertex v. ( )
10. To get a minimum spanning tree from Graph, Dikstra’s algorithm can
be used. ( )
B. Please read the following questions and options, then check the one that
corresponds to the correct answer.
1. The below figure shows the part of an AVL tree. After executing
delete(9), the below subtree becomes imbalanced. Draw the balanced
subtree after repairing this subtree with the appropriate rotation.
2. The below figure shows an undirected Graph G=(V,E). Mark the
visited edges after conducting Breadth-First Search (BFS). Then, we
consider that the vertex r is starting vertex.
3. The below figure shows a weighted directed Graph G=(V,E). Shows
the shortest path determined by applying Dijkstra’s algorithm. Then,
we consider that the vertex r is starting vertex.