At sports day each high jump (in cm) goes into jumps; there is at least one. Write best_jump(jumps) and use max_element to find the highest.
best_jump({120, 135, 128})→135best_jump({90})→90int best_jump(const vector<int> &jumps)#include <algorithm>
#include <vector>
using namespace std;
int best_jump(const vector<int> &jumps) {
// your code here: return the highest jump
return jumps[0];
}
Run tries the examples. When they look right, Submit.