Answers for "unique(s.begin(), s.end()) - s.begin();"

0

unique(s.begin(), s.end()) - s.begin();

template 
ForwardIterator unique (ForwardIterator first, ForwardIterator last);

first: Forward iterator to the first element in the container.
last: forward iterator to the last element in the container.

Return Value: It returns an iterator to the element that follows 
the last element not removed. The range between first and this iterator includes 
all the elements in the sequence that were not
duplicates and hence not removed.
Posted by: Guest on September-05-2021

Browse Popular Code Answers by Language