0
1.9kviews
Write a program in C to implement Merge Sort.

I recommend you to go through this tutorial first and once you done with this refer to the program written below kaivan shah.


1 Answer
0
11views
#include<stdio.h>
#include<conio.h>
void mergeSort(int [], int, int, int);
void partition(int [],int, int);
void main()
{
    int list[50];
    int i, size;

    printf("Enter total number of elements:");
    scanf("%d", &size);

    printf("Enter the elements:\n");
    for(i = 0; i < size; i++)
    {
     scanf("%d", &list[i]);
    }

    partition(list, 0, size - 1);

    printf("After merge sort:\n");
    for(i …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.