Created
September 15, 2018 06:43
-
-
Save mochow13/f1c62fe37a5bdf6106b6cf3281e8741d to your computer and use it in GitHub Desktop.
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
std::vector<int> c1={1,2,5,5,5,6,9,12}; | |
std::vector<int> c2={2,4,4,5,7,15}; | |
std::vector<int> result; // contains merged elements | |
std::merge(begin(c1), end(c1), begin(c2), end(c2), std::back_inserter(result)); | |
// result = {1, 2, 2, 4, 4, 5, 5, 5, 5, 6, 7, 9, 12, 15} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment