Study the following code snippet:
vector< int > data = {100, 142, 138, 96, 32, 149};
swap(data[2], data[5]);
int val1 = *max_element(data.begin(), data.begin() +3);
int val2 = *max_element(data.begin()+3,data.end());
cout<< min(val1, val2);
Will the above code compile? If yes then what is the output?