Question: Retrieve the NodeData sibling of a given object in the tree ( via pass - by - reference, second parameter which may initially be garbage
Retrieve the NodeData sibling of a given object in the tree via passbyreference, second parameter which may
initially be garbage It will be a copy of the actual object in the tree if param exists and is found
SPECIAL INSTRUCTIONS: For this function, you do not get to know that the tree is a binary search tree.
You must solve the problem for a general binary tree where data could be stored anywhere eg tree T above
bool getSiblingconst NodeData& NodeData& const;
Retrieve the NodeData parent of a given object in the tree via passbyreference, second parameter which may
initially be garbage It will be a copy of the actual object in the tree if param exists and is found
SPECIAL INSTRUCTIONS: Ditto getSibling you do not get to know that the tree is a binary search tree.
bool getParentconst NodeData& NodeData& const;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
