Skip to content

Instantly share code, notes, and snippets.

@steveobbayi
Created May 20, 2016 15:46
Show Gist options
  • Save steveobbayi/e385f6b35a1a294e89bdb25fe88576eb to your computer and use it in GitHub Desktop.
Save steveobbayi/e385f6b35a1a294e89bdb25fe88576eb to your computer and use it in GitHub Desktop.
...
vector<int> v = {2,5,3,6,4,8,5,9,6,1,7,3,12,14,25};
int a = minmax_element(v.begin(), v.end());
// The value of "a.fist" above is 1
// The value of "a.second" above is 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment