Challenge Summary
This challenge asks me to sort an array using merge sort algorithm.
Whiteboard Process
Approach & Efficiency
Merge sort is a sorting algorithm that divides the array into two parts recursively until we have individual elements then we sort each half and return until we have the full array back sorted.
Solution
- Time: O(nlog(n))
- The basic operation of this algorithm is dividing the array into two parts recursively until we have individual elements then we sort each half and return until we have the full array back sorted.
- Space: O(n)