CST 370 Week 2
WELCOME TO WEEK 2
Learning Journal - CST 370
This week, I learned about the Analysis of Algorithms. First, we reviewed the topic of time efficiency notations, focusing on three key types: Big O Notation, Big-Theta Notation, and Big-Omega Notation.
- Big O Notation represents the upper bound, meaning it describes all functions with the same or lower order of growth as f(n).
- Big-Theta Notation represents the exact bound, meaning it includes all functions with the same order of growth as f(n).
- Big-Omega Notation represents the lower bound, meaning it captures all functions with the same or higher order of growth as f(n).
We also revisited the orders of growth, which, to be honest, I had forgotten about. Luckily, we reviewed them this week to help us better analyze algorithms and identify their time complexity or order of growth. The eight most common categories we covered were: 1, log n, n, n log n, n², n³, 2ⁿ, and n!.
To figure out the order of growth, we must simplify T(n). There are two simple rules to follow:
- Eliminate low-order terms.
- Eliminate constant coefficients.
By following these rules when simplifying, we can successfully identify the correct time complexity category.
Next, we explored the analysis of non-recursive and recursive algorithms and how they differ. The main difference is that recursive algorithms require what is called backward substitution for their analysis.
Finally, we were introduced to brute force, a straightforward approach to solving a problem directly based on its statement. Some examples given in the textbook were Selection Sort and Bubble Sort.
Comments
Post a Comment