// ── CREATE ───────────────────────────────────────────────────────vector<int> v = {1, 2, 3, 4, 5};vector<int> v(5, 0); // size 5, all zeros// ── BEGIN / END ──────────────────────────────────────────────────auto a = v.begin(); // points to firstauto b = v.end(); // points AFTER lastcout << *a << " " << *(b - 1); // first and last element// ── ITERATE (prefer auto &) ──────────────────────────────────────for (auto &i : v) // & = reference → modifies original i++;for (auto i : v) // copy → does NOT modify original i++;// ── ITERATE with index ───────────────────────────────────────────for (auto i = v.begin(); i != v.end(); i++) cout << *i << " "; // avoid this, prefer range-for// ── COMMON OPERATIONS ────────────────────────────────────────────v.push_back(6); // O(1) amortizedv.pop_back(); // O(1)v.size(); // O(1)v.front(); v.back(); // first and last elementv[i]; // O(1) access, no bounds checkv.at(i); // O(1) access, with bounds checkv.clear(); // remove all elements