Update heap_sort.c

Added time complexities of functions used.
This commit is contained in:
Shezza221b 2020-10-01 01:44:53 +05:30 committed by GitHub
parent 544f492720
commit 60a69ecf58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,8 @@
/**
* max_heapify takes O(logn).
* build_maxheap takes O(n).
* heapsort takes O(nlogn) since it requires above mentioned functions.
*/
#include <stdio.h>
void max_heapify(int *a, int i, int n);