*** BST *** * In this lab you will start implementing your own data structure library. * You will implement the following UML in Java: .. figure:: ./uml_review.drawio.png :align: center | BST - Start =========== 1. Create a package :code:`trees`. 2. Create the interface :code:`SearchTree`. BST - BinaryTree ================ 1. Create the structure of the **generic** class :code:`BinaryTree`. * It should implement :code:`Serializable`. 2. Create the generic and static class :code:`Node`. * It should implement :code:`Serializable`. * It contains only three data fields. * Implement the constructor :code:`Node(E data)`. * Implement the method :code:`toString()`. 3. Now finish the class :code:`BinaryTree`. * You will implement three constructors: * :code:`BinaryTree()` * :code:`BinaryTree(Node root)` * :code:`BinaryTree(E data, BinaryTree leftTree, BinaryTree rightTree)` BST - BinaryTreeSearch ====================== 1. Create the generic class :code:`BinarySearchTree`. * The generic type :code:`E` should inherit from :code:`Comparable`. * The class should inherit from :code:`BinaryTree`. * And it should implement :code:`SearchTree` 2. Implement all the function from the interface. 3. Make sure that your code works. LeetCode ======== If you are done, you can start doing the following problems on LeetCode: * https://leetcode.com/problems/binary-tree-inorder-traversal/ * https://leetcode.com/problems/subtree-of-another-tree/ * https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/ * https://leetcode.com/problems/unique-binary-search-trees/ **ENSURE WE HAVE RECORDED YOUR COMPLETION. FAILURE TO DO SO WILL RESULT IN A GRADE OF 0!**