Skip to content

Commit 18407f8

Browse files
authored
Merge pull request #57 from RAJNEESH1708/master
Updated mergeSort.cpp
2 parents c583035 + 5f6b2ce commit 18407f8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

classical_algorithms/c++/mergesort.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
14
void msort(int d[],int size){
25

36
int i,j,k, result[size], mid=size/2;
@@ -7,7 +10,6 @@ void msort(int d[],int size){
710
return;
811
}
912

10-
1113
msort(d,mid);
1214

1315
msort(&d[mid],size-mid);
@@ -35,7 +37,7 @@ int main()
3537
int i;
3638

3739
for( i = 0 ; i<7 ; i++)
38-
printf("%d ", arr[i]);
39-
printf("\n");
40+
cout<<arr[i]<<endl;
41+
4042
return 0;
41-
}
43+
}

0 commit comments

Comments
 (0)