#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void showVector(vector<int> iv, int showTimes)
{
cout << "This is " << showTimes << " vector's content is : ";
for (auto it = iv.begin(); it != iv.end(); it++)
cout << *it << " ";
cout << endl;
cout << "size = " << iv.size() << endl;
cout << "capacity =" << iv.capacity() << endl << endl;
}
int main()
{
cout << "This is heap tutorials \n";
vector<int> iv = { 0,1,2,3,4,5,6,7,8,9 };
showVector(iv, 1);
make_heap(iv.begin(), iv.end());
showVector(iv, 2);
iv.push_back(10);
showVector(iv, 3);
push_heap(iv.begin(), iv.end());
showVector(iv, 4);
pop_heap(iv.begin(), iv.end());
showVector(iv, 5);
iv.pop_back();
showVector(iv, 6);
sort_heap(iv.begin(), iv.end());
showVector(iv, 7);
}
