Week 4 journal entry
Week four focused on another algorithm called merge sort. The basis of merge sort is the divide-and-conquer approach. The array is recursively split into smaller subarrays until each subarray contains a single element. These subarrays are then merged back together in sorted order. One of the most important things to remember about merge sort is its time complexity. In terms of Big-O notation, merge sort consistently runs in O(n log n) time, which makes it much more efficient than simpler sorting algorithms for large data sets.
Comments
Post a Comment