Posts

Showing posts from February, 2026

Computer Science BS Journal (CST370) : Week 6

 This week in CST370 introduced several advanced algorithm techniques for optimization and graph problems. We began with non-comparison sorting , such as counting sort or radix sort, which sort data without directly comparing elements. These algorithms can achieve linear time under certain conditions, making them faster than traditional comparison-based sorts. We then studied dynamic programming , a method that solves complex problems by breaking them into overlapping subproblems and storing solutions to avoid repeated work. This approach is powerful for optimization problems like shortest paths or resource allocation. Next, we covered Warshall’s algorithm , which computes the transitive closure of a graph. It determines which vertices are reachable from others, helping analyze connectivity. Related to this, Floyd’s algorithm finds the shortest paths between all pairs of vertices in a weighted graph, improving efficiency compared to running single-source algorithms repeatedly. ...

Computer Science BS Journal (CST370) : Week 6

 This week in CST370, we focused on advanced data structures designed to improve efficiency. We started with AVL Trees , which are self-balancing binary search trees. I learned how rotations help maintain balance after insertions and deletions, ensuring operations like search, insert, and delete stay at  O ( log ⁡ n ) O(\log n) O ( log n ) . Next, we studied 2-3 Trees , another balanced search tree structure. Unlike binary trees, nodes can store one or two keys, which helps keep the tree perfectly balanced. This guarantees efficient operations and deepened my understanding of how balancing improves performance. We then covered Heaps and Heapsort . A heap is a complete binary tree that satisfies the heap property (max-heap or min-heap). I learned how heaps are useful for priority queues and how Heapsort uses the heap structure to sort elements in O ( n log ⁡ n ) O(n \log n) O ( n log n ) time without needing extra space like merge sort. Finally, we explored Hashing , which ...

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  O ( n log ⁡ n ) O(n \log n) O ( n log n ) 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 ab...

Computer Science BS Journal (CST370) : Week 4

 This week in CST370, we focused on merge sort and completed our midterm, which reviewed many of the algorithm concepts we’ve covered so far. Learning merge sort helped me better understand the divide and conquer strategy. The algorithm works by splitting a list into smaller halves, recursively sorting each half, and then merging them back together in order. I found it interesting how breaking a problem into smaller pieces can lead to a much more efficient solution, with a time complexity of  O ( n log ⁡ n ) O(n \log n) O ( n log n ) , compared to simpler sorting methods. We also took the midterm, which tested topics like asymptotic notation, brute force methods, recursion, and graph search algorithms such as BFS and DFS. Reviewing these concepts helped reinforce how different techniques are suited for different problems and how important it is to analyze efficiency before choosing an approach. Overall, this week strengthened my understanding of sorting algorithms and gave ...