CST 370 - Module 4
Week 4,
This week doesn't cover a lot of new material to allow us to study and review our previous assignments and quizzes. This allows us to truly understand how we analyze algorithms, and to review how me may have missed some questions on the previous quizzes.
Besides being given time to review the material from the past three weeks, we were introduced to the Merge Sort algorithm. Though some of us are already familiar with Merge Sort, the material was still informative as we got to analyze it more thoroughly and re-familiarize ourselves with the concept.
In this case, we implement Merge Sort with recursion, which also follows a Divide and Conquer technique. Starting with a full size array, we split the array in half and make two recursive calls using each half of the array. Once the array is eventually separated into it's individual values, merge the values while sorting them, eventually having a fully sorted array. As previously mentioned, this algorithm follows the Divide and Conquer technique, thus, we must find the Recurrence relation, which then will allow us to find the time complexity of the algorithm. In the Merge Sort's case, the time complexity is Θ(n*log n).
Comments
Post a Comment