Tuesday, March 18, 2014

Weekly Summary: 3/18 - Binary Search Tree + Sorting Intro

For the past week, we went over binary search tree and briefly talked about the different types of sorting menthods. The most challenging topic that I find is the deletion of nodes from the binary search tree. Binary search tree is really efficient as it allows us to find our node through the elimination of one side of the tree by checking whether or not the desired node is bigger or smaller than the root of the tree. Thus, the challenging part for the deletion fo nodes is to maintain this attribute or functionality by taking out an exisitng node. I was able to clearly understand this topic through the lectures by considering different scenarios such as when the desired node is greater/smaller than the root. I find it really helpful to break down complex situations and tackle each subproblem individually.
For sorting, we were introduced to some basic sorting methods mentioned in CSC 108, which includes bubble sort, insertion sort, and selection sort. The sorting method is more efficient if it produces the shortest running time. Running time can vary a lot depending on the number of items or parameters being used. Therefore, it is important to figure out the relation between the running time and the number of items. Although a constatnt relation might require a longer running time than an exponential one with small number of items, but as the number of item increases, a constant relation usually requires a shorter running time.



No comments:

Post a Comment