// ── ABOUT ────────────────────────────────────────────────────────
// All work on range: fun(start, end)  →  applies to [start, end)
// Array:  start = arr,        end = arr + n
// Vector: start = v.begin(),  end = v.end()
 
vector<int> v = {25, 5, 5, 4, 8, 7};
 
// ── MIN / MAX ────────────────────────────────────────────────────
int mn = *min_element(v.begin(), v.end());   // O(n) → 4
int mx = *max_element(v.begin(), v.end());   // O(n) → 25
 
// ── SUM ──────────────────────────────────────────────────────────
int sum = accumulate(v.begin(), v.end(), 0); // O(n) → third arg = initial value
 
// ── COUNT ────────────────────────────────────────────────────────
int ct = count(v.begin(), v.end(), 5);       // O(n) → count of 5 → 2
 
// ── FIND ─────────────────────────────────────────────────────────
auto it = find(v.begin(), v.end(), 8);       // O(n) → returns iterator
if (it != v.end())
    cout << *it;                             // found → 8
else
    cout << "not found";
 
// ── REVERSE ──────────────────────────────────────────────────────
reverse(v.begin(), v.end());                 // O(n) → in-place
reverse(v.begin() + 1, v.begin() + 4);      // reverse index 1 to 3
 
string str = "abcdefg";
reverse(str.begin(), str.end());             // works on strings too
 
// ── ALL / ANY / NONE ─────────────────────────────────────────────
vector<int> vt = {2, 4, 6, 8};
 
all_of(vt.begin(), vt.end(),  [](int x){ return x % 2 == 0; });  // true  → all even
none_of(vt.begin(), vt.end(), [](int x){ return x < 0; });       // true  → none negative
any_of(vt.begin(), vt.end(),  [](int x){ return x < 0; });       // false → none negative