CST 370 - Design and Analysis of Algorithms - Week 3

This week in CST370, we focused on understanding various brute force and exhaustive search algorithms, such as string matching, depth-first search and breadth-first search. I learned that brute force is a straightforward approach to solving problems by directly applying the problem's definition. For instance, selection sort and bubble sort are classic examples of brute force algorithms where elements are compared and swapped until the array is sorted. The brute force string matching algorithm was particularly insightful, as it involves searching for a pattern in a given text through character by character comparisons. We also learned about its efficiency in terms of best case and worst case scenarios, noting that its average case efficiency is linear, Θ(n). This helped me understand the importance of time complexity when analyzing algorithms and how different cases affect performance. In addition to brute force algorithms, we learned about exhaustive search approaches, such as th...