I know it is irrelevant to post it within a slog, but I feel if anyone is reading this and doesn't know what a Binary Search Tree is now is your chance to learn it in the simplest way. A binary search tree is Tree, and when you have to draw out a search tree it will look in the same shape as a regular tree. What makes a binary search tree so unique is the fact that the node values it contains are sorted with the larger nodes on the right, and the smaller nodes on the left.
As Professor Horton mentioned in lectures, a binary search tree is faster when you have to look for a value because your first step of comparing whether the root value is greater than the value you are looking for cuts the number of nodes to search in half.
I think a binary search tree is only a fast and efficient if it is balanced, since if there are no numbers smaller than the root, and the value you are looking for is at the bottom of the tree, then you basically have to search the entire tree and every node within it.
SOOO that was week 9 for me, and it was a pretty laid back week once you understood the main concept of the week.
No comments:
Post a Comment