CST 370: Week 4
This week we only learned about merge sorting, which involves using a divide-and-conquer approach to sorting the contents of an array. Given an unsorted array, merge sorting requires dividing the array into halves, referred to as subarrays. The subarrays are continuously divided into smaller subarrays until we are left with individual elements. Each of those elements are then compare against another and placed within a new array in a sorted fashion. Those arrays are then compared and combined with others until we are left with an array in similar size and content of the original one, though now sorted.
Comments
Post a Comment