-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
33 lines (31 loc) · 784 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <vector>
#include <cassert>
#include <chrono>
#include <random>
#include "maxPQ.h"
using namespace std;
using namespace std::chrono;
random_device rd;
mt19937 e(rd());
uniform_int_distribution<int> dist(INT16_MIN, INT16_MAX);
int main(){
// int N = 10000;
// for(int i = 0; i < 10; i++){
// unsigned j = 0;
// vector<int> l;
// for(int j = 0; j < N; j++){
// l.push_back(dist(e));
// }
// QuickSort<int>::sort(l, 0, l.size() - 1, j);
// cout << j << endl;
// }
int arr[] = {5,-3,2,10,0};
MaxPQ<int> maxpq(arr, sizeof(arr) / sizeof(arr[0]));
while(!maxpq.isEmpty()){
cout << maxpq.delMax() << ",";
}
cout << endl;
// maxpq.insert(12);
return 0;
}