CST 370 Week 5

 

WELCOME TO WEEK 5

Learning Journal - CST 370

This week, we learned a lot of new material. We started with an introduction to the quicksort algorithm, which is a divide-and-conquer based algorithm. We came to learn that it is generally more efficient than insertion sort and, in many cases, even merge sort!

We then covered binary tree traversals, which include preorder, inorder, and postorder. I had already learned these in the past, but it was good to review them! I almost forgot about them, and I must admit I had to do a little more research to fully understand them again. Eventually, once I grasped the concepts, they became much easier to understand.

Next, we were introduced to the decrease-and-conquer technique, which is based on reducing a problem’s instance and solving it incrementally. Once the smaller instances are solved, we extend their solutions to the original problem. There are three variations of decrease-and-conquer

  1. Decrease by a constant (e.g., topological sorting)
  2. Decrease by a factor (e.g., binary search)
  3. Variable-size decrease (e.g., insertion and search in a BST)

Finally, we learned about the insertion sort and topological sorting algorithms. We also explored how presorting input can be extremely beneficial for searching and element uniqueness problems. It was a lot to cover this week, but all of it was really helpful for the homework!

Comments

Popular posts from this blog

CST 370 Week 3

CST 311 Week 1

CST 370 Week 2