Why the output is coming to be 50 it should have been 20.
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int v[] = {10, 20, 30, 50, 20, 70, 30};
int* i1;
i1 = std::min_element(v + 3, v + 4);
cout << *i1 << "\n";
return 0;
}