Posts

Showing posts from February, 2026

Week 7 - CST 370

 This week we learned about non comparison sorting such as counting sort and radix sort, which can have faster time complexities in certain instances. Dynamic programming solves complex problems by breaking them down into simpler subproblems. Coin Collecting and Coin Row are examples of dynamic programming. We used Warshall's algorithm to find the reachability between nodes and Floyd's algorithm to determine the shortest paths between pairs of vertices in a weighted graph. We also used Prim's algorithm, which grows a tree one edge at a time, choosing the edge with the smallest weight at each step for find the Minimum Spanning Tree. 

Week 6 - CST 370

 This week we learned about two balanced binary search tree algorithms: AVL tree and 2-3 tree. AVL tree balances via rotations and each node has at most two children while a 2-3 tree has two or three nodes per children and one or two keys per node. We also learned about heaps which are data structures They can be either max heaps or min heaps, where the largest or smallest element is a the root. Children in max heaps less than or equal to their parent node and greater than or equal to their parent node in min heaps. We also learned about hashing, which is an efficient way of finding, adding and removing data. It involves keys, hash function and hash table to store the data using a modular hashing, for example. 

Week 5 - CST 370

 This week we learned about quicksort, median of three, binary tree traversals, decrease and conquer algorithms like binary search, topological sort and insertion sort. Quick sort organizes numbers by choosing a pivot (element in a list) and sorting smaller numbers to left of it and larger numbers to the right. Median of Three quick sort is a more efficient way of sorting in that it chooses a pivot that has a value closer towards the center of a list. Insertion sort orders a list one element at a time, comparing the next element against what is already in an ordered list. 

Week 4 - CST 370

 This week we learned about merge sort and had our midterm. Merge sort is part of the divide-and-conquer algorithm in which a problem is divided into several subproblem, usually of equal size. Each subproblem is solved and then all are combined for the final solution. Concerning the midterm, I learned that I need to spend more time going over the materials and creating the cheat sheet. I feel like I panicked when I did the midterm and noticed that I did not put enough information on the cheat sheet to help me out.