Computer Science BS Journal (CST370) : Week 5
This week in CST370, we explored several new algorithm design techniques and data structure concepts. We started with quick sort, a divide and conquer sorting algorithm that selects a pivot and partitions elements into smaller and larger groups. I learned how its average time complexity of
makes it very efficient in practice, even though poor pivot choices can slow it down.
We also studied binary tree traversal and height. Traversals like preorder, inorder, and postorder help process tree nodes in different orders depending on the problem. Understanding tree height showed how it affects performance, since deeper trees can increase search and traversal time.
Next, we discussed decrease and conquer, which solves problems by reducing them into smaller instances of the same problem. This strategy feels more incremental than divide and conquer and is useful for algorithms like insertion sort or binary search.
Finally, we learned about transform-and-conquer through pre-sorting, where sorting data first can simplify later steps and improve efficiency. This showed me how organizing data early can make problem solving easier overall.
This week helped me see how different strategies shape algorithm performance and design choices.
Comments
Post a Comment