len : 13
* 4* 5* 6* 7* 11* 12* 10* 20* 30* 40* 1* 2* 3

 mergesort called, parent




splitting into 2 arrays :0 to 6, 7 to 12

 mergesort called, parent first




splitting into 2 arrays :0 to 3, 4 to 6

 mergesort called, parent first




splitting into 2 arrays :0 to 1, 2 to 3

 mergesort called, parent first




splitting into 2 arrays :0 to 0, 1 to 1

 mergesort called, parent first

 mergesort called, parent second


*********************
temp array created! len 2
comparing elements: 4 and 5
4 inserted
* 4* 0
still some left before end
* 4* 0

 mergesort called, parent second




splitting into 2 arrays :2 to 2, 3 to 3

 mergesort called, parent first

 mergesort called, parent second


*********************
temp array created! len 2
comparing elements: 6 and 7
6 inserted
* 6* 0
still some left before end
* 6* 0


*********************
temp array created! len 4
comparing elements: 4 and 6
4 inserted
* 4* 0* 0* 0
comparing elements: 5 and 6
5 inserted
* 4* 5* 0* 0
still some left before end
* 4* 5* 0* 0
* 4* 5* 6* 0

 mergesort called, parent second




splitting into 2 arrays :4 to 5, 6 to 6

 mergesort called, parent first




splitting into 2 arrays :4 to 4, 5 to 5

 mergesort called, parent first

 mergesort called, parent second


*********************
temp array created! len 2
comparing elements: 11 and 12
11 inserted
* 11* 0
still some left before end
* 11* 0

 mergesort called, parent second


*********************
temp array created! len 3
comparing elements: 11 and 10
10 inserted
* 10* 0* 0
still some left before middle
* 10* 0* 0
* 10* 11* 0


*********************
temp array created! len 7
comparing elements: 4 and 10
4 inserted
* 4* 0* 0* 0* 0* 0* 0
comparing elements: 5 and 10
5 inserted
* 4* 5* 0* 0* 0* 0* 0
comparing elements: 6 and 10
6 inserted
* 4* 5* 6* 0* 0* 0* 0
comparing elements: 7 and 10
7 inserted
* 4* 5* 6* 7* 0* 0* 0
still some left before end
* 4* 5* 6* 7* 0* 0* 0
* 4* 5* 6* 7* 10* 0* 0
* 4* 5* 6* 7* 10* 11* 0

 mergesort called, parent second




splitting into 2 arrays :7 to 9, 10 to 12

 mergesort called, parent first




splitting into 2 arrays :7 to 8, 9 to 9

 mergesort called, parent first




splitting into 2 arrays :7 to 7, 8 to 8

 mergesort called, parent first

 mergesort called, parent second


*********************
temp array created! len 2
comparing elements: 20 and 30
20 inserted
* 20* 0
still some left before end
* 20* 0

 mergesort called, parent second


*********************
temp array created! len 3
comparing elements: 20 and 40
20 inserted
* 20* 0* 0
comparing elements: 30 and 40
30 inserted
* 20* 30* 0
still some left before end
* 20* 30* 0

 mergesort called, parent second




splitting into 2 arrays :10 to 11, 12 to 12

 mergesort called, parent first




splitting into 2 arrays :10 to 10, 11 to 11

 mergesort called, parent first

 mergesort called, parent second


*********************
temp array created! len 2
comparing elements: 1 and 2
1 inserted
* 1* 0
still some left before end
* 1* 0

 mergesort called, parent second


*********************
temp array created! len 3
comparing elements: 1 and 3
1 inserted
* 1* 0* 0
comparing elements: 2 and 3
2 inserted
* 1* 2* 0
still some left before end
* 1* 2* 0


*********************
temp array created! len 6
comparing elements: 20 and 1
1 inserted
* 1* 0* 0* 0* 0* 0
comparing elements: 20 and 2
2 inserted
* 1* 2* 0* 0* 0* 0
comparing elements: 20 and 3
3 inserted
* 1* 2* 3* 0* 0* 0
still some left before middle
* 1* 2* 3* 0* 0* 0
* 1* 2* 3* 20* 0* 0
* 1* 2* 3* 20* 30* 0


*********************
temp array created! len 13
comparing elements: 4 and 1
1 inserted
* 1* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0
comparing elements: 4 and 2
2 inserted
* 1* 2* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0
comparing elements: 4 and 3
3 inserted
* 1* 2* 3* 0* 0* 0* 0* 0* 0* 0* 0* 0* 0
comparing elements: 4 and 20
4 inserted
* 1* 2* 3* 4* 0* 0* 0* 0* 0* 0* 0* 0* 0
comparing elements: 5 and 20
5 inserted
* 1* 2* 3* 4* 5* 0* 0* 0* 0* 0* 0* 0* 0
comparing elements: 6 and 20
6 inserted
* 1* 2* 3* 4* 5* 6* 0* 0* 0* 0* 0* 0* 0
comparing elements: 7 and 20
7 inserted
* 1* 2* 3* 4* 5* 6* 7* 0* 0* 0* 0* 0* 0
comparing elements: 10 and 20
10 inserted
* 1* 2* 3* 4* 5* 6* 7* 10* 0* 0* 0* 0* 0
comparing elements: 11 and 20
11 inserted
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 0* 0* 0* 0
comparing elements: 12 and 20
12 inserted
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 12* 0* 0* 0
still some left before end
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 12* 0* 0* 0
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 12* 20* 0* 0
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 12* 20* 30* 0
* 1* 2* 3* 4* 5* 6* 7* 10* 11* 12* 20* 30* 40