Posts

Showing posts from July, 2025

CST370 Week 5

Hello everyone,  This week we studied binary‑tree traversals preorder, inorder, and postorder but I kept mixing them up. I finally got it when I attended TA office hours, and it clicked. Walking through Quick Sort step by step helped me see how the Decrease and Conquer approach works by breaking problems into smaller chunks. Then we looked at Kahn’s algorithm, and watching it remove nodes with no incoming edges reminded me of picking a pivot in Quick Sort. Seeing these patterns repeat helped me realize that many algorithms work by simplifying things piece by piece. 

CST370 Week 4

Hello everyone, This week we had our midterm exam, and I spent a lot of time studying and reviewing previous modules. We have covered a lot of material, and I realized I was a bit rusty on certain topics, especially those we learned earlier in the class. But I feel like I did well, I answered most of the questions confidently. It was a good reminder of how important regular review is. I am still waiting for my grade, but overall, it was a good experience that pushed me to refresh and reinforce what we have learned.  We also covered the merge sort algorithm this week, which helped reinforce the concept of divide and conquer  strategy. Merge sort works by splitting an array into smaller parts, sorting each part, and then merging them back together. It was helpful to see how breaking a problem into smaller, manageable pieces can make it more efficient to solve.

CST370 Week 3

July 11, 2025  This week we learned about brute force string matching , scanning every possible alignment to locate substrings in O(n·m) time. We also looked at  exhaustive search techniques. We looked at Depth First Search (DFS) . Next, we covered Breadth-First Search (BFS).  I really enjoyed the graph problems because they were a bit challenging to understand at first, but once I got how they worked, it was fun to solve them Finally, we applied the divide-and-conquer paradigm, breaking problems into subproblems and recombining results, and analyzed their runtimes using the Master Theorem.

CST370 Week 2

July 5, 2025 So this week we explored how an algorithm’s run-time changes as the input size n grows. Big O is the worst case scenario for example, searching an array when a key value is only at the very last index or not even in the array Omega is the best case scenario for example, when  a key value is the very first element. Theta gives the tight middle ground, it can describe something as simple as a loop that prints every element in an array. In that task the loop always performs one basic operation per element, no matter how the data look This is Big O: 0 <= f(n) <= Cg(n) for all n >= n0 Theta: 0 <= C2g(n) <= f(n) <= C1g(n) for n >= n0 Big Omega: 0 <= Cg(n) <= f(n) for all n >= n0