Posts

Week 7

  Weekly Learning Journal: Week 7 Reflection Technical Focus: Breaking the O mega(n log n)  Barrier This week’s module centered on a pivotal shift in algorithmic strategy: the transition from comparison-based sorting to Non-Comparison Sorting techniques like Counting Sort and Radix Sort . In previous modules, we established that comparison-based algorithms (like Merge Sort or Quick Sort) are mathematically bounded by a lower limit of \Omega(n \log n)$ . However, I learned that by making specific assumptions about the input data—such as the range of integers or the number of digits—we can achieve Linear Time Complexity O(n) . While the time efficiency is superior, the trade-off lies in Space Complexity , as these algorithms require auxiliary arrays or "buckets" to track frequencies or digit distributions. Strategic Transitions: Greedy vs. Dynamic Programming Furthermore, we began exploring the Greedy Technique through Prim’s Algorithm for finding the Minimum Spanning Tree ...

Week 6

  Week 6 Learning Journal: Heaps and Hashing This week’s module focused on advanced data structures, specifically Heaps and Hash Tables, which are essential for optimizing search and priority-based operations. Heaps and Priority Queues I learned about the Max Heap property, where every parent node must be greater than or equal to its children. This structure is particularly efficient for implementing Priority Queues. One of the most interesting takeaways was the $O(n)$ bottom-up heap construction algorithm. Unlike inserting elements one by one ( $O(n \log n)$ ), the bottom-up approach starts from the last non-leaf node and "heapifies" down, which is mathematically more efficient. I also practiced the mechanics of insert and deleteMax . When deleting the root, we replace it with the last element and percolate it down to maintain the heap property. This ensures that the highest priority element is always accessible at the root in $O(1)$ time. Hashing and Collision Resolution...

Week 5

  Week 5 Learning Journal: Advanced Algorithm Analysis and Graph Theory During Week 5, my studies centered on the refinement of sorting techniques and the practical application of graph theory. A major focus was the Master Theorem , which provides a streamlined "cookbook" method for determining the asymptotic bounds of recurrence relations. Applying this to Divide and Conquer algorithms like Merge Sort and QuickSort helped me visualize how the number of subproblems ( a ) and the size of those subproblems ( n/b ) directly dictate the overall time complexity. I also spent significant time on Decrease-and-Conquer algorithms. While Divide and Conquer breaks a problem into multiple subproblems, Decrease-and-Conquer reduces a problem to a single, smaller instance. A prime example I studied was Binary Search . Understanding its O(log n)  efficiency is vital, but I also learned about its application in Topological Sorting . I specifically focused on Kahn’s Algorithm , which uses a q...

Week 4

  Week 4 Learning Journal: Merge Sort, The Master Theorem, and Midterm Synthesis Technical Summary: Week 4 was a pivotal point in CST 370 as we transitioned from basic brute-force techniques to the Divide-and-Conquer paradigm. The primary focus was Merge Sort , a sophisticated sorting algorithm that employs a recursive strategy to achieve $O(n \log n)$ efficiency. The logic involves two distinct phases: the "Divide" phase, where the array is split into $n$ sub-lists (each containing one element), and the "Merge" phase, where those sub-lists are repeatedly merged to produce new sorted sub-lists until only one remains. A major highlight of this week was applying the Master Theorem to analyze algorithm efficiency. The Master Theorem provides a mechanical way to solve recurrence relations of the form T(n) = aT(n/b) + f(n) . For Merge Sort, the relation is T(n) = 2T(n/2) + \Theta(n) . Since the work done at each level of the recursion ( f(n) ) matches the cost of the...

Week 3

This week focused on the practical implementation of graph algorithms, specifically  Depth-First Search (DFS)  and the  Traveling Salesman Problem (TSP)  using exhaustive search . Applying these concepts through programming has highlighted both the elegance of recursive structures and the significant computational challenges associated with NP-hard problems. Key Concepts & Implementations - DFS & Systematic Traversal : Implementing DFS for directed graphs reinforced the importance of using a "mark array" to track visitation sequences .  A crucial takeaway was ensuring the algorithm follows a  numerical ascending order  for adjacent vertices to maintain consistency in the output . - TSP & Exhaustive Search : Tackling the Traveling Salesman Problem required using  permutations  of vertices to find the optimal Hamiltonian cycle .  While effective for a small number of vertices (under 15), this approach clearly demonstrates how q...

Week 2

Weekly Learning Journal: Algorithm Analysis & Recursion This week, my study focused on the Algorithm Analysis Framework , specifically the formal application of asymptotic notations ( $O$ , $\Omega$ , and $\Theta$ ). While I previously had a surface-level understanding of Big-O, this module challenged me to define the tight bounds of an algorithm's efficiency using Big-Theta. I learned that while Big-O provides a worst-case "ceiling," Big-Theta is often more useful for describing the actual growth rate of non-recursive loops, such as those found in standard sorting or searching algorithms. A significant portion of my time was dedicated to the analysis of recursive algorithms . This was a step up in complexity from non-recursive analysis because it requires setting up a recurrence relation . I practiced the backward substitution method , which involves expanding the recursive calls until a pattern emerges that can be expressed as a summation. For example, seeing how a...

Week 1

  Week 1 Learning Journal Entry Module: Introduction to Algorithms and Fundamental Data Structures Date: January 13, 2026 This week, I focused on the formal definition of algorithms and the various ways to measure their efficiency. I studied Euclid’s algorithm for finding the Greatest Common Divisor (GCD) and compared it to the consecutive integer checking algorithm, noting how algorithm choice significantly impacts performance. I also reviewed fundamental data structures, specifically focusing on graph representations (adjacency matrices vs. adjacency lists) and how they differ for weighted and unweighted graphs. Implementing the Palindrome puzzle was a great exercise in string manipulation; it taught me how to effectively use the two-pointer technique and the importance of data preprocessing, such as filtering non-alphanumeric characters and normalizing case to ensure logical correctness. Finally, the "Fake Coin" and "Mislabeled Baskets" puzzles served as a s...