Skip to content
Snippets Groups Projects
Commit b9783818 authored by Adam Blank's avatar Adam Blank
Browse files

Merge branch 'tweak-binary-search-tree' into 'master'

Fix docs + tweak misleading comment in BST



See merge request !3
parents 26a9d8df e750d4fb
No related branches found
No related tags found
No related merge requests found
......@@ -35,9 +35,11 @@ public class BinarySearchTree<K extends Comparable<K>, V>
public BSTNode[] children; // The children of this node.
/**
* Create a new data node and increment the enclosing tree's size.
* Create a new data node.
*
* @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")
......@@ -68,7 +70,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, null);
if (this.root == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment