Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

min element in stl c++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  	vector<int> v{ 9, 4, 7, 2, 5, 10, 11, 12, 1, 3, 6 };
	int c = *min_element(v.begin(), v.end());
  
    cout<<"Min Element of the vector is "<< c;
    return 0;
}
 
PREVIOUS NEXT
Tagged: #min #element #stl
ADD COMMENT
Topic
Name
3+6 =