Consider the following array:

$$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline 5 & 8 & 1 & 9& -2 & 10 & 3 & 2 & 6 & 2 & 0 & 7 & -4 \\\hline\end{array}$$

Trace MergeSort using the above table to sort its entries. Give only the trace of the execution and not the code of the sort function.


Difficulty level
Video recording
This exercise is mostly suitable for students
		5    8    1    9    -2    10    3    2    6    2    0    7    -4

	5 8 1		9 -2 10		   3 2 6		2 0 7 -4

5	8 1	   9	   -2 10	3	2 6	   2 0 		7 -4

     8 	    1		 -2      10          2     6    2       0     7    -4

MERGE


     1     8             -2      10          2     6    0       2     -4    7
5                  9                    3                       

1 5 8                  -2 9 10              2 3 6         0 2 -4 7

 	-2 1 5 8 9 10				-4 0 2 2 3 6 7
			-4 -2 0 1 2 2 3 5 6 7 8 9 10

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Solitaire Card Game