The STL algorithms, unique() and unique_copy() do not require their input to be sorted. The result might be surprising though, since only duplicates that are adjacent are removed.
Reference: Effective STL by Scott Meyers, Addison-Wesley, 2001., p. 147.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment