CST370 Week 3
CST370 Week 3 This week I studied a lot more about recursion and search algorithms in order to understand the homework better. We learned about brute force algorithms like exhaustive search, which is useful in finding all permutations of a set. Exhaustive search goes through each possible case and then identifies which of these cases is either most efficient or solves the problem. The time complexity for exhaustive search is dependent on the number of permutations it has [ (n - 1)! ]. There are two graph traversal algorithms: depth-first search (DFS) and breadth-first search (BFS). DFS makes use of a stack and a mark array to determine what nodes have been visited, and creates a tree with tree edges. Time efficiency for DFS is dependent on the sum of the number of vertices and edges it has: 𝚯 (|v| + |e|). BFS makes use of a queue and a mark array to determine what nodes have been v...