Coding and the PAs Consider the following up-tree linked data structure that you
ID: 3863606 • Letter: C
Question
Coding and the PAs Consider the following up-tree linked data structure that you will use to implement the disjoint set ADT. struct DS Node {DS Node* parent;//pointer to the parent in the up tree int size;//slice of this subtree on your answer sheet, write union and f inf by ordering the statement below by their letters so that union employs the weight union optimizing (by tree size) and find employee path compression. You should use the linked data structure given above without modification in your implementation. Assume the caller of union and find somehow has pointer to the relevant DS Nodes.//Precondition; X and Y are root nodes////Precondition; X and Y are trees are using weighted union//return; the root of the new DS Node Y) {if (X > parent car size if (Y rightarrow size > X > null if (Y rightarrow size == null X rightarrow size +- 1; X rightarrow size +- 1; X rightarrow size > X - > size; return nullptr; return Y; return X; return Y; return X;Explanation / Answer
The correct order for the given code is,
1)C
2)H
3)G
4)D
5)I
6)F
7)B
8)M
9)A
10)L
11)E
12)J
13)K
14)N
15)O
16)P
17)T
18)S
19)R
20)Q
21)U