CST 370 Weekly Journal #2
Weekly journal
This week, we learned about time efficiency notations: Big-O (O), Big-Theta (Θ), and Big-Omega (Ω). Big-O describes the worst-case performance of an algorithm, such as the SequentialAdd algorithm, which is O(n) because it grows linearly. Big-Theta shows the exact growth rate when the best, average, and worst cases are the same, like in the Average algorithm with Θ(n), but it can't be used if the cases differ, as in SequentialSearch. Big-Omega focuses on the best-case scenario but is less commonly used. We also practiced identifying the basic operation in algorithms to determine their dominant growth factor, like the Binary algorithm, which has a time complexity of Θ(log₂n). Analyzing examples like Display_2D_Stars and CheckDuplicate helped clarify how to use these notations, especially Big-O for worst-case scenarios. All in all, this helped me get a better perspective on how much efficiency is needed in solving problems effectively.
Comments
Post a Comment