CST 370: Week 7

This week we learned two new sorting techniques, counting sort and radix sort, both of which sort a set of inputted values without needing to compare them to one another. The counting sort finds the frequency of each value within the set then determines how they must be distributed by calculating the accumulation of the frequencies from the lowest end of the range to the highest end. Instead of evaluating each value as a whole, the radix sort involves looking at the individual digits of each value and distributes them based on a range of 0 to 9, repeating the process until each value has been distributed from their least significant digit (LSD) to their first (or leading) digit. We also learned about dynamic programming, which is where we can save computations when solving a problem that involves recalculating it's subproblems multiple times by saving the solutions to those subproblems in an array that can be referred to later rather than recalculating. We learned to apply this technique to graphs using Warshall's algorithm, which computes the transitive closure of a graph, and Floyd's algorithm, which finds the shortest path between all pairs of vertices. Lastly, we learned about the greedy technique, which makes locally optimal choices throughout various steps without changing those choices to potential reach the overall most optimal result. We used Prim's algorithm to view this in practice which grows a tree based on the cheapest available edge.

Comments

Popular posts from this blog

CST 334: Week 4

Week 4 Learning Journal Post

CST 363: Week 5