Question: Please help with question 2 2) (40) In some environments, such as Genetics, it is not uncommon to have binary trees where the edges between
Please help with question 2
2) (40) In some environments, such as Genetics, it is not uncommon to have binary trees where the edges between nodes have weights or distances. Give Recursive Pseudocode for how one might calculate the two closest Nodes, returning a minimal distance edge. Assume Nodes and Edges defined as given, in C/++ form (though your answer does not have to be): Structs Your answer tNode! laput A binary tree pointer (root node) Stringva Output: Ratusang". Null if there are nodes Edge" left: Edge* dostNode" node) Edge right 3: struct Edge Node descendant double distance #
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
