Project - Binary Search Trees: Instructions revised for binary search tree implementation #28142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
kyak15 changes to confusing wording/requirements for the BST assignment.
Because
The PR is to fix confusing wording/requirements in the Binary Search Tree assignment. The original issue asked the user to create a Tree class with an array, but to also use that array in the buildTree function. Thus creating confusion on an object or class directed approach for BST implementation. In my changes, I instruct the user to follow a class directed approach. The use of creating a BST with an unsorted or sorted array is not an option either. The 'Tree' class is initialized with a root of null. The user is then instructed to create the following methods inside the 'Tree' class:
The first 9 methods allow the user to focus on core BST methods and operations, without needing to worry about inheriting an array to sort and check for duplicates. After successfully implementing the core methods, the user can then use an array of the current tree values to check for balance issues. If the BST is unbalanced, reBalance uses a traversal method to get an array of values from the tree, and buildTree is called to re-balance the tree.
This PR
Issue
Related to #27620
Pull Request Requirements
location of change: brief description of change
format, e.g.Intro to HTML and CSS lesson: Fix link text
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section