Sunday, 20 March 2016

Week 9 - Binary Search Trees

Since this week contained a midterm this post has a topic which though important will be short. This week was all about Binary Search Trees.

For those who haven't seen a binary search tree Wikipedia gives a good picture of it:


So basically a binary search tree gives numbers in order and gives a very fast way to find numbers, so if I was looking for 7 I look at the top and see 7<8 so check left then 7>3 so right 7>6 so right again and then we find the number, it takes just a few runs to get the number we were looking for. This is the power of the binary search tree. It is truly a very interesting application of the binary tree with real applications.

AM Signing Off

No comments:

Post a Comment