Question: public FHtreeNode find ( FHtreeNode root, E x , int level ) { FHtreeNode retval; / / first if ( mSize = = 0 |
public FHtreeNode findFHtreeNode root, E x int level
FHtreeNode retval;
first
if mSize root null
return null;
second
if rootdata.equalsx
retu rn root;
otherwise, recurse. don't process sibs if this was the original call
if level && retval findrootsib, x level null
return retval;
return findrootfirstChild, xlevel; Use the following general tree to answer problems and
general tree:
Problem
Assume that the call findnodeF is made. Starting at node F find node N
Note: nodeF is a reference to node
Trace the method calls.
Specify the return value after each call is completed.
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
