4 void AfficheTab(int T
[], int n
) {
5 for (int i
= 0; i
< n
; i
++) {
6 printf("T[%d]=%d\n", i
, T
[i
]);
10 /** This merge sort implementation only work with 2^n array size */
11 void TriFusion(int T
[], int n
) {
12 int i
= 0, j
= 0, k
= 0;
17 T1
= malloc(n
/2*sizeof(int));
18 T2
= malloc(n
/2*sizeof(int));
19 for (int i
= 0; i
< n
/2; i
++) {
25 while (k
< n
/2 && j
< n
/2) {
52 int T
[] = {2, 7, 2, 3, 4, 1, 5, 5};
53 int tabSize
= sizeof(T
)/sizeof(T
[0]);
55 AfficheTab(T
, tabSize
);
59 AfficheTab(T
, tabSize
);