Posts

Showing posts from August, 2025

CST370 Week 7

This week I learned Counting Sort and how it differs from comparison sorts. The idea is to build a frequency array for the value range, convert it to a cumulative (distribution) array, then scan the input right-to-left to place each element at count[value]-1 in the output and decrement the count. . Next we reviewed Radix Sort the idea is similar to Counting Sort, but you sort the integers by  least significant digit (LSD), so no range is needed. We start from the least significant digit and work our way left. After a stable pass on each digit, the list ends up fully sorted.  We looked at Dynamic Programming, which is a technique to avoid a lot of recursive calls by using an array to store solutions to subproblems. For example with Fibonacci, instead of making of repeated calls, we just run a simple for-loop to fill an array and reuse results. That turns the Fibonacci algorithm from exponential time complexity to linear time complexity which is really impressive to me. We look ...

CST370 Week 6

 Hello everyone, This week we looked into balanced binary trees like AVL trees. I understood most of the concepts, but the Right-Left and Left-Right rotations were a little challenging to grasp. I will keep practicing more examples I feel like I’m close, but I still get stuck and forget the next step. The 2-3 trees were also tricky a few quiz questions really got me stuck. I need to read and watch the videos again.  I attended the TA’s office hours yesterday, August 4, 2025, and found it really helpful for understanding AVL tree rotations. It was interesting and fun to hear how other students viewed the concept from different perspectives. I think I have a much better grasp of it now.