Skip to content

Instantly share code, notes, and snippets.

View aatishnn's full-sized avatar

Aatish Neupane aatishnn

View GitHub Profile
@aatishnn
aatishnn / binarymaxheap.c
Last active June 3, 2021 07:24
Priority Queue and Max-heap implementation in C (Inspired from https://gist.github.com/martinkunev/1365481)
// Array representation according to Wikipedia article but starts from 0 index.
#include <stdio.h>
#include <stdlib.h>
struct heap {
int size;
int count;
int *heaparr;
};