June 2017
Intermediate to advanced
532 pages
12h 59m
English
In this section, we will fill an std::vector instance with some example numbers, and implement a quick remove function, which removes any item from a vector in O(1) time.
#include <iostream> #include <vector> #include <algorithm>
int main() { std::vector<int> v {123, 456, 789, 100, 200};
quick_remove_at(v, 2); for (int i : v) { std::cout ...Read now
Unlock full access