Skip to content

[Giuseppe Picciuca] algorithms_task_6#551

Open
gpicciuca wants to merge 1 commit intosmay1613:masterfrom
gpicciuca:task17
Open

[Giuseppe Picciuca] algorithms_task_6#551
gpicciuca wants to merge 1 commit intosmay1613:masterfrom
gpicciuca:task17

Conversation

@gpicciuca
Copy link

I guess another way would been to search for the position of each element in source inside the target container and insert the values at that specific position. That way we wouldn't need to sort.

typename std::iterator_traits<FwIt>::reference>::type>::value,
"FwIt must point to const data");

std::copy(sourceBegin, sourceEnd, std::back_inserter(target));
Copy link
Owner

@smay1613 smay1613 Feb 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider insertion from source to output + search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants