Sunday, 16 March 2014

Week 9 – Binary Search Trees, big-Oh

                Something new that I learned in class this week was binary search trees. I learned about big-Oh in CSC165 and it wasn’t new to me. Big-Oh during lecture was a good refresher since I did it last semester. Big-Oh is basically the performance of a programming being executed. The best programs run at constant time and the worst run at a time of factorial. In a binary search tree the data in the left sub tree is less than the value of the root. While the data in the right sub tree is greater than the root. This makes searching much more efficient. We learned about deletion of data from a binary search tree. This task can be very difficult because of the massive amounts of conditions needed to satisfy. A binary search tree in comparison to a list, a binary search tree will finish to task much faster on a large set of data. In a binary search tree, each time we narrow down the data to search by fifty percent which is extremely good. In lecture we also revisited selection sort and insertion sort from CSC108 last semester. We also looked at some running time analysis for various examples of code. The most enjoyable thing in class was binary search trees since I already knew about big-Oh.

                The lab was the most frustrating thing. We found out near the very end of the lab that we have to use recursion to solve our problem. Overall, I’m confident with this week’s material except for the lab we had this week. I’ll try to do the lab on my own during the next week in preparation for the midterm. We had an exercise due on trees. It was relatively easy and took about two hours to complete. 

No comments:

Post a Comment