Posts

Showing posts from July, 2025

CST370 Week 5

     This week we went over Kahn’s algorithm, Quick Sort, and how to traverse a BST. I struggled a bit on my first read-through, but going step by step and writing things out helped a lot. Following the pointers in Quick Sort and tracking each step made it easier to understand. For Kahn’s algorithm, building the in degree table and manually popping nodes off my paper queue helped me visualize the process and work through it more clearly. Breaking things into smaller chunks made the material feel a lot more manageable.

CST370 Week 4

     This week I mostly focused on studying for the midterm. I reviewed the lecture slides, redid some of the homework problems, and practiced topics like BFS, DFS, recurrence relations, and time complexity. Putting together the cheat sheet was super helpful. It made me really think through what we have covered and helped me remember things I had forgotten. Writing everything out in my own words made a big difference. I also spent time practicing the logic puzzles. Starting with smaller input sizes instead of trying to jump straight to the full solution made those problems a lot easier to approach.

CST370 Week 3

 This week we went over BFS and DFS algorithms. We covered how BFS uses a FIFO queue, while DFS uses LIFO stacks. The first homework focused on DFS and used recursion to take advantage of the implicit stack. Our second assignment was on the Traveling Salesman Problem, using brute force to try all possible paths. Since the input could have up to 15 cities, the program had to generate and check every permutation, which really showed how quickly brute force becomes inefficient.

CST370 Week 2

     I found the assignments this week to be a lot of fun. I really enjoy coding challenges that feel like brain teasers. As for the material, recursion was definitely the trickiest part for me. I had to take my time with those questions on the quiz and did a bit of extra reading to get a better grasp on it. I’ve found that recursion makes a lot more sense when I see it in action through code, rather than trying to understand it in the abstract.

CST370 Week 1

 This week we worked on a palindrome puzzle. I immediately recognized it from when I solved a similar one on LeetCode a few years ago, though back then I used Python. My first instinct was to use a two pointer approach, but I specifically remembered this one because the optimal Python solution was a one liner: return string.lower() == reversed(string.lower()) I looked up the equivalent syntax in Java and gave that a try. Once I got that working, I added the logic to remove any non alphanumeric characters from the input and then ran the provided test cases to verify the results. Overall it was a really fun assignment.