This week I learned how to analyze algorithm efficiency using Big O, Theta, and Omega notation. I also explored both nonrecursive and recursive algorithms including how to use recurrence relations and brute force strategies. In Homework 2-1 I practiced reading user input, storing integers, sorting them, and finding the smallest distance between any two numbers. It helped me get more comfortable with arrays, loops, and basic math logic in Java. In Homework 2-2 I built on that by sorting numbers and displaying them in a cleaner format using ranges for consecutive values like 51 to 53. This helped reinforce conditionals and how to work with array data more efficiently. Overall this week was a solid mix of theory and hands-on coding.
This week I focused a lot on understanding time complexity and recursive analysis. It was challenging at first to figure out how to break down recursive functions and write the correct recurrence relations. Applying the Master Theorem was especially tough because I had to carefully identify each part of the formula and decide which case applied. I also spent time reviewing the difference between Big O, Big Omega, and Big Theta, which helped me better understand how to describe the efficiency of an algorithm. These concepts took time to click but working through examples really helped.
Comments
Post a Comment