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.
Comments
Post a Comment