Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#define LENGTH 10
int heapSize;
void Heapify(int* A, int i)
{
int l = 2 * i + 1;
int r = 2 * i + 2;
int largest;
/* Merge sort in C */
#include<stdio.h>
#include<stdlib.h>
// Function to Merge Arrays L and R into A.
// lefCount = number of elements in L
// rightCount = number of elements in R.
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;