[Example Codes]make_heap(v.begin(), v.end()), v.push_back(), push_heap(v.begin(), v.end()), pop_heap(v.begin(), v.end())
make_heap(v.begin(), v.end()), v.push_back(), push_heap(v.begin(), v.end()), pop_heap(v.begin(), v.end()) // WhoisHOO // C++에 빠지다 // Example Codes of Heap #include #include #include using namespace std; int main() { vector v = { 5,8,10,95,1,87,85,49 }; make_heap(v.begin(), v.end()); v.push_back(26); push_heap(v.begin(), v.end()); v.push_back(28); push_heap(v.begin(), v.end()); pop_heap(v.begin()..
2020. 4. 30.