Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
p2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cse332-20sp
p2
Commits
d43ac54c
Commit
d43ac54c
authored
9 years ago
by
Michael Lee
Browse files
Options
Downloads
Patches
Plain Diff
Fix docs + tweak misleading comment in BST
parent
2534033d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cse332/datastructures/trees/BinarySearchTree.java
+4
-2
4 additions, 2 deletions
src/cse332/datastructures/trees/BinarySearchTree.java
with
4 additions
and
2 deletions
src/cse332/datastructures/trees/BinarySearchTree.java
+
4
−
2
View file @
d43ac54c
...
...
@@ -37,7 +37,9 @@ public class BinarySearchTree<K extends Comparable<K>, V>
/**
* Create a new data node and increment the enclosing tree's size.
*
* @param data
* @param key
* key with which the specified value is to be associated
* @param value
* data element to be stored at this node.
*/
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -71,7 +73,7 @@ public class BinarySearchTree<K extends Comparable<K>, V>
}
}
// If value is null, we need to actually add in the new value
// If value is
not
null, we need to actually add in the new value
if
(
value
!=
null
)
{
current
=
new
BSTNode
(
key
,
value
);
if
(
this
.
root
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment