Skip to content
Snippets Groups Projects
Commit b5b1abdd authored by Kevin Lin's avatar Kevin Lin
Browse files

_slides: Expand explanation for merge sort

parent d2a523bf
No related branches found
No related tags found
No related merge requests found
Pipeline #396097 passed with stages
in 1 minute and 5 seconds
......@@ -28,6 +28,8 @@ Give the two subarrays that will be merged by the final step of merge sort on th
{% endcapture %}
{% capture explanation %}
Merge sort is a recursive procedure, so it's not necessary to simulate the entire sorting algorithm! We can just assume that `mergeSort` on the left/right halves will return the sorted version of that half.
Unlike insertion sort, selection sort, and heap sort, the recursive calls to `mergeSort` operate on each subarray rather than the entire array! Notice how an element from the right half will not swap to the left half until the final `merge` step.
{% endcapture %}
{% include question.html question=question explanation=explanation number=1 %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment