Created
May 2, 2022 16:01
-
-
Save mym0404/6260ef15f41abc719541dd531bb537a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
signed main() { | |
vector<int> arr{0, 1, 2, 3, 4, 5}; | |
arr.push_back(6); // O(1) | |
arr.pop_back(); // O(1) | |
arr.insert(arr.begin() + 3, 6); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment