In addition to last week's Binary Tree, this week we learned about Binary Search Trees (BST), which is very similar to a Binary Tree. The main difference between a normal Binary Tree and a Binary Search Tree is that, a Binary Search Tree is "balanced". The data in a Binary Search Tree are comparable, values in the left subtree are less than the node value, and values in the right subtree are more than the node value. Therefore, searching for a value on a Binary Search Tree will take much less time than searching for a value on a Binary Tree.
No comments:
Post a Comment