week9 heapsort and quicksort compare

This commit is contained in:
2021-04-28 22:02:17 +08:00
parent 9ed5742b89
commit d9790182c8
2 changed files with 129 additions and 0 deletions

16
week9/T8.h Normal file
View File

@@ -0,0 +1,16 @@
#include <time.h>
void QuickSort(int *A, int left, int right);
int Partition(int *A, int left, int right);
void HeapSort(int *A, int n);
void PercDown(int *A, int i, int n);
bool Check(int *A, int size);
void Swap(int *a, int *b);
void PrintTimeDuration(clock_t start_time, clock_t end_time);