Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Exam 2 CSE 310 with correct answers, Exams of Data Structures and Algorithms

Exam 2 CSE 310 with correct answers

Typology: Exams

2024/2025

Available from 07/03/2025

Achieverr
Achieverr 🇺🇸

4.3

(7)

9K documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Exam |\2 |\CSE |\310 |\with |\correct |\answers
Binary |\Search |\Tree |\properties |\- |\CORRECT |\ANSWERS |\✔✔Each |\node |\
has |\0 |\to |\2 |\children
Children |\on |\left |\are |\less |\than |\parent
Children |\on |\right |\are |\greater |\than |\parent
Dynamic |\Set |\Operations |\- |\CORRECT |\ANSWERS |\✔✔Add, |\Delete, |\
Minimum, |\Maximum, |\Search, |\Predecessor, |\Successor
Binary |\Search |\Tree |\minimum |\- |\CORRECT |\ANSWERS |\✔✔Returns |\the |\
bottom |\left |\most |\node
Binary |\Search |\Tree |\Maximum |\- |\CORRECT |\ANSWERS |\✔✔Returns |\the |\
bottom |\right |\most |\node
In |\order |\traversal |\- |\CORRECT |\ANSWERS |\✔✔left, |\root, |\right
Pre |\order |\traversal |\- |\CORRECT |\ANSWERS |\✔✔root, |\left, |\right
Post |\order |\traversal |\- |\CORRECT |\ANSWERS |\✔✔left, |\right, |\root
pf3
pf4
pf5

Partial preview of the text

Download Exam 2 CSE 310 with correct answers and more Exams Data Structures and Algorithms in PDF only on Docsity!

Exam |\ 2 |\CSE |\ 310 |\with |\correct |\answers

Binary |\Search |\Tree |\properties |- |\CORRECT |\ANSWERS |\✔✔Each |\node |
has |\ 0 |\to |\ 2 |\children Children |\on |\left |\are |\less |\than |\parent Children |\on |\right |\are |\greater |\than |\parent Dynamic |\Set |\Operations |- |\CORRECT |\ANSWERS |\✔✔Add, |\Delete, |
Minimum, |\Maximum, |\Search, |\Predecessor, |\Successor Binary |\Search |\Tree |\minimum |- |\CORRECT |\ANSWERS |\✔✔Returns |\the |
bottom |\left |\most |\node Binary |\Search |\Tree |\Maximum |- |\CORRECT |\ANSWERS |\✔✔Returns |\the |
bottom |\right |\most |\node In |\order |\traversal |- |\CORRECT |\ANSWERS |\✔✔left, |\root, |\right Pre |\order |\traversal |- |\CORRECT |\ANSWERS |\✔✔root, |\left, |\right Post |\order |\traversal |- |\CORRECT |\ANSWERS |\✔✔left, |\right, |\root

Tree |\predecessor |- |\CORRECT |\ANSWERS |\✔✔returns |\the |\greatest |
number |\less |\than |\x Tree |\successor |- |\CORRECT |\ANSWERS |\✔✔returns |\the |\lowest |\number |
greater |\than |\x Which |\traversal |\helps |\with |\predecessor/successor |- |\CORRECT |
ANSWERS |\✔✔In |\Order |\traversal Binary |\search |\tree |\search |\runtime |- |\CORRECT |\ANSWERS |\✔✔O(h) Binary |\search |\tree |\insert |\runtime |- |\CORRECT |\ANSWERS |\✔✔O(logn) Binary |\search |\tree |\transplant |\runtime |- |\CORRECT |\ANSWERS |\✔✔O(1) Properties |\of |\RB |\BST |- |\CORRECT |\ANSWERS |\✔✔Every |\node |\is |\either |
red |\or |\black Every |\null |\node |\is |\black Every |\red |\node |\has |\black |\children Every |\path |\has |\the |\same |\number |\of |\black |\nodes The |\root |\is |\black

Directed |\Graph |- |\CORRECT |\ANSWERS |\✔✔A |\graph |\in |\which |\the |
edges |\have |\direction Cyclic |\graph |- |\CORRECT |\ANSWERS |\✔✔A |\graph |\that |\contains |\a |\cycle Sparse |\graph |- |\CORRECT |\ANSWERS |\✔✔m |= |\n Dense |\graph |- |\CORRECT |\ANSWERS |\✔✔m |= |\n^ Adjacency |\List |- |\CORRECT |\ANSWERS |\✔✔Array |\of |\linked |\list Adjacency |\Matrix |- |\CORRECT |\ANSWERS |\✔✔2d |\array Which |\implementation |\better |\for |\sparse |\graph? |- |\CORRECT |
ANSWERS |\✔✔Adjacency |\list Which |\implementation |\better |\for |\dense |\graph |- |\CORRECT |\ANSWERS |
✔✔Adjacency |\Matrix Breadth |\first |\search |- |\CORRECT |\ANSWERS |\✔✔Each |\layer |\is |\fully |
discovered |\before |\moving |\on

White, |\gray, |\black |- |\CORRECT |\ANSWERS |\✔✔Undiscovered, |\partially |
discovered, |\fully |\discovered What |\data |\structure |\to |\use |\for |\BFS |- |\CORRECT |\ANSWERS |\✔✔Queue Runtime |\of |\DFS |- |\CORRECT |\ANSWERS |\✔✔O(n+m) What |\data |\structure |\to |\use |\for |\DFS |- |\CORRECT |\ANSWERS |\✔✔Stack Forward |\edge |- |\CORRECT |\ANSWERS |\✔✔non-tree |\edges |\connecting |\a |\node |\u |\to |\descendant |\v Back |\edges |- |\CORRECT |\ANSWERS |\✔✔Edges |\connecting |\a |\node |\u |\to |
an |\ancestor |\v Cross |\edges |- |\CORRECT |\ANSWERS |\✔✔everything |\else Tree |\edges |- |\CORRECT |\ANSWERS |\✔✔edge |\such |\that |\v |\was |
discovered |\from |\u Topological |\sort |\run |\time |- |\CORRECT |\ANSWERS |\✔✔O(n+m) Run |\time |\of |\BFS |- |\CORRECT |\ANSWERS |\✔✔O(n+m)

Disjoint |\sets, |\m |\and |\n |- |\CORRECT |\ANSWERS |\✔✔set |\of |\all |
operations, |\set |\of |\all |\makeset |\operations union |\by |\rank |\run |\time |- |\CORRECT |\ANSWERS |\✔✔Theta(mlogn) Path |\compression |- |\CORRECT |\ANSWERS |\✔✔used |\during |\find |\to |
make |\each |\node |\on |\find |\path |\point |\to |\root