Posts

cst- 370 - week 7- learning journal

This week’s module focused on dynamic programming and graph algorithms, specifically the maximum coin collection problem and the Floyd algorithm for all-pairs shortest paths. In the first lab, we implemented a dynamic programming solution on an n by m grid, carefully constructing a DP table to compute the maximum number of coins that can be collected when moving only right or down. The most important part was understanding how the recurrence relation builds optimal solutions from smaller subproblems. We also practiced reconstructing the optimal path and handling tie-breaking rules correctly. In the second lab, we implemented Floyd’s algorithm using a triple nested loop structure to update shortest path distances. This reinforced the concept of gradually improving solutions through intermediate vertices and understanding O(n^3) time complexity.

cst-370- week 6 - learning journal

This week’s module helped me strengthen my understanding of heap structures and hash tables through hands-on Java implementation. In the first lab, I implemented a max heap that supported insertion, deletion of the maximum element, checking whether an array satisfied heap properties, and rebuilding the heap when necessary. Writing the sift-up and sift-down operations from scratch helped me better understand how heap order is maintained after structural changes. In the second lab, I implemented linear probing with rehashing when the load factor exceeded 0.5. Reinserting all keys into a newly sized prime table made me clearly understand how resizing preserves performance. These labs reinforced how theoretical data structure concepts translate into practical code.

cst- 370- week 5 - learning journal

This week I focused on implementing sorting and graph algorithms in Java. I developed quicksort using Hoare’s partition method exactly as shown in the pseudocode and made sure to handle boundary issues carefully. I also implemented insertion sort and compared their performance using System.nanoTime to measure elapsed time. Testing different input orders helped me understand how recursion depth affects quicksort, especially with ascending data. In addition, I implemented Kahn’s algorithm for topological sorting in Java, computing in-degrees and processing vertices in ascending order. These labs strengthened my understanding of algorithm behavior and efficiency in practical Java implementations.

cst-370- week 4- learning journal

This week I focused heavily on preparing for the midterm by reviewing all of the core topics we have covered so far in the course. I went back over fundamental data structures such as trees, binary search trees, and graphs, including different graph types and representations like adjacency lists and matrices. I also reviewed important algorithm concepts such as merge sort and the divide and conquer approach, especially how merging works and why the time complexity is Θ(n log n). In addition, I practiced time complexity analysis, recurrence relations, and the Master Theorem, along with BFS, DFS, and classic problems like TSP and Knapsack.

cst 370 - week 3- learning journal

This week deepened my understanding of how different algorithmic techniques work and how to analyze their efficiency. I learned how brute-force approaches can lead to worst-case behavior when repeated comparisons occur, and why smarter strategies are often needed. Graph traversal became clearer through understanding breadth-first search, which explores vertices level by level using a queue and guarantees the shortest path in terms of edges. I also gained insight into divide-and-conquer algorithms, where problems are recursively split into smaller subproblems and combined to form a solution. Finally, learning how to analyze recursive algorithms using recurrence relations and the Master Theorem helped me confidently determine time complexity without relying on lengthy expansions.

cst370-week 2- learning -journal

This week’s module focused on analyzing algorithm efficiency using asymptotic notation and understanding basic problem-solving strategies such as brute force. I learned how to identify a basic operation in an algorithm and count how many times it executes in order to determine time complexity. The examples on finding a maximum value and checking uniqueness helped clarify how to analyze both best-case and worst-case scenarios, especially when nested loops are involved. I also learned how brute force approaches like sequential search and selection sort prioritize simplicity over efficiency, often resulting in higher time complexity. This helped me understand why brute force is usually a starting point that can later be improved with more efficient algorithms.

cst370-week-1- learning-journal

This week I worked on Lab 0, Homework 1, and an algorithmic puzzle that helped strengthen my understanding of both programming fundamentals and algorithmic thinking. In Lab 0, I focused on setting up my development environment correctly, compiling and running Java programs in VS Code, and following strict submission guidelines such as file naming conventions and source code–only uploads. This lab reinforced the importance of attention to detail, since small mistakes in setup or formatting can prevent programs from compiling or being graded correctly. Homework 1 required designing a program to determine whether an input string is a palindrome. Through this assignment, I learned how to preprocess input by removing non-alphanumeric characters and ignoring letter case before applying the algorithm. I also practiced using a two-pointer technique to efficiently compare characters from both ends of a string. Additionally, the fake coin puzzle demonstrated how algorithmic strategies can reduc...