# Advanced Data Structures The goal of this assignment is to practic...

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.Queue;
import java.util.Stack;

public class FamilyTree {

private Name root;
//height of the root = 0
//so when it is empty, the height = -1
private int heightOfTree = -1;
private int countFirst = 0;
private int countSecond = 0;

public FamilyTree() {
super();
}

//make the root of the tree
//Fred,1900
public void root(Name root) {
this.root = root;
}
//get root

public Name getRoot() {
return this.root;
}

//find the height of tree
//traverse from the root to find the height of the tree
public boolean heightOfTree(Name currentName, int check) {
int test = 0;
//if the current height is more than what we find before
//update height of the tree to the bigger one(current height)
/*
* before it runs currentName = -1
* and then it's going to the root which heightOfTree = 0
* then currentName>heightTree, update currentName.height = 0
* recursive this to find the biggest number which is the height of the tree...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

\$30.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.