Created
September 6, 2022 00:36
-
-
Save hucancode/4e33a841a42044df73daa6956ea56e4f to your computer and use it in GitHub Desktop.
insert into a sorted vector
This file contains 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
void insertion_sort(vector<int>& a, int& value) { | |
a.insert(upper_bound(a.begin(), a.end(), value), value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment