Implementing a Binary Search Tree (BST) in Java - More Of Less
This is a walk-through of how to create a binary search tree (BST) using Java 1.7 and recursion. In order to keep things simple, only adding and retrieving data from the tree has been implemented, deleting data will be added in a separate article.
Before we get into the code, a quick overview of BSTs
A binary search tree is a node-based binary tree data structure that has the following properties:
- The left subtree of a node contains only nodes with keys less than the node's key.
- The right subtree of a node contains only nodes with keys greater than the node's key.
- The left and right subtree each must also be a binary search tree.
- There must be no duplicate nodes.
Read full article from Implementing a Binary Search Tree (BST) in Java - More Of Less
No comments:
Post a Comment