Posts

CST370 Week 7

This week, I focused on non-comparison sorting methods like counting sort and radix sort, and I saw how they achieve linear time under certain conditions. I then explored dynamic programming through the coin-collecting and coin-row problems, which helped me understand how optimal substructure and overlapping subproblems work. Next, I learned about graph-algorithms for transitive closure and all-pairs shortest paths (, ), and finally the greedy paradigm through minimum spanning trees and . Working through the example exercises clarified how each technique fits different problem types.

CST370 Week 6

This week I explored AVL trees , learning how they keep balance via rotations when insertions or deletions cause imbalance. I practiced determining valid AVL trees and performing rotations (left, right, left-right, right-left). Then we looked at 2-3 trees , which allow nodes to have 2 or 3 children and help maintain balanced search structure. After that, we studied heaps and heapsort (building max heaps, removing the max, bottom-up heap construction) and their time complexity. Finally, we covered hashing , including collision handling, load factor, and rehashing strategies. Working through the exercises and visual tools really helped solidify these more advanced data structure concepts.

CST370 Week 5

This week I dove into Quick Sort, learning how partitioning around a pivot can yield efficient sorting on average. I also studied binary tree traversals (inorder, preorder, postorder) and how to compute the tree’s height. The concept of decrease-and-conquer came next, applying it to binary search. We also learned about directed acyclic graphs (DAGs) and topological sorting, including Kahn’s algorithm. Finally, transform-and-conquer via pre-sorting taught me how sometimes sorting first can simplify later steps. These topics helped me see a broad set of algorithmic patterns and trade-offs.

CST 370 Week 4

 This week I focused on learning merge sort and its divide-and-conquer approach. I practiced breaking down arrays into subproblems, merging sorted halves, and analyzing its time efficiency. We also had a review session for the midterm, which helped clarify key topics from previous weeks such as asymptotic notation, brute force, and search algorithms. Preparing for the midterm encouraged me to revisit exercises and puzzles, reinforcing my understanding and giving me more confidence in applying these techniques.

CST 370 Week 3

This week, I explored several important algorithmic strategies. I began with brute force methods such as string matching and exhaustive search, applying them to problems like TSP and knapsack. Then I studied depth-first search (DFS) and breadth-first search (BFS), comparing their processes and analyzing their time efficiency. I also learned the divide and conquer approach, including the Master Theorem for analyzing recursive algorithms. The puzzles and exercises, especially Fake Coin and Finger Count, helped reinforce these concepts in a more engaging way.

CST370 Week 2

This week, I deepened my understanding of algorithm analysis by studying asymptotic notations, including Big-O, Big-Ω, and Big-Θ, and applying them to both recursive and nonrecursive algorithms. I practiced solving recurrence relations using backward substitution and worked through example problems and puzzles like the 4-gallon water challenge. I also learned about brute force as a problem-solving paradigm and how it applies to algorithm design. Overall, this week strengthened my ability to evaluate algorithm efficiency more systematically.

CST370 Week 1

This week I was introduced to the foundations of algorithms and data structures, with a particular emphasis on Euclid’s algorithm for finding the greatest common divisor (GCD). At first, the concept of an algorithm felt very broad, but working through Euclid’s method made it more concrete. I learned that algorithms are essentially step by step procedures that can be expressed clearly in pseudocode or implemented directly in code. Euclid’s algorithm stood out because of its elegance and efficiency. Instead of relying on factorization, which can be tedious, the algorithm repeatedly applies the modulus operation until the remainder is zero. This shows how a simple mathematical idea can be transformed into an efficient computational process. I also explored variations of GCD calculations and saw how different problem solving approaches can be compared in terms of efficiency. That led into the idea of algorithm analysis, which focuses not only on correctness but also on performance. I bega...