STL Flashcards

1
Q

What does STL unique do?

A

Eliminates all except the first element from every consecutive group of equivalent elements from (first to last) and returns a past the end iterator for the new logical end of the range.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is STL unique complexity?

A

Complexity is std::distance(first, last) - 1, meaning N

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does STL unique work?

A

Removing is done by shifting the elements in the range in such a way that elements to be erased are overwritten.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly