Question: in java eclipse Purpose The purpose of this assignment is to assist you to learn a binary search tree and tree data structure. Skills The
in java eclipse
Purpose
The purpose of this assignment is to assist you to learn a binary search tree and tree data structure.
Skills
The purpose of this assignment is to help you practice the following skills that are essential to your success in this course in school in this field in professional life beyond school:
Traversedisplay elements in a binary tree inorder, preorder, postorder, breadthfirst traversal
Implement Huffman coding for compressing data using a binary tree
Knowledge
This assignment will also help you to become familiar with the following important content knowledge in this discipline:
Tree data structure
Tree inorder, preorder, and postorder
BreadthFirst Search
DepthFirst Search
Tasks
Define a new class named BSTWithNumberOfLeaves that extends BST with the following methods: public int getNumberOfLeaves
Define a new class named BSTWithNumberOfNonLeaves that extends BST with the following methods: public int getNumberOfNonLeaves
Implement the clone and equals methods in the BST class. Two BST trees are equal if they contain the same elements. The clone method returns an identical copy of a BST
Define a new class named BSTWithBFT that extends BST with the following method: public void breadthFirstTraversal
Redefine TreeNode by adding a reference to a node's parent. Reimplement the insert and delete methods in the BST class to update the parent for each node in the tree. Also, add the following new method in BST:
private TreeNode mathrmE getNodeE element
private boolean isLeafE element
private ArrayList get PathE e
Submission Format
source code and sample run
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
