+ 2
What output??
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { int myints[] = {10, 20, 30, 5, 15}; vector<int> v(myints, myints + 5); make_heap (v.begin(), v.end()); pop_heap (v.begin(), v.end()); v.pop_back(); cout << v.front() << '\n'; return 0; }
4 Answers
+ 2
There's is a c++ code playground in sololearn, why don't you try?
+ 2
I kown that, I need to run yourl mine as the compiler to guess what output
+ 2
20 is the output .
+ 1
ekhlas Mohamed Abdallah Mohamed Same code same output everywhere