unique copy « STL Algorithms Modifying sequence operations « C++

1.Remove adjacent duplicates: unique_copy
2.Read all characters while compressing whitespaces
3.Use unique_copy to copy elements in an array to list with back_inserter
4.Copy only unique elements in a vector into another vector
5.Use unique_copy to print elements with consecutive duplicates removed
6.Use unique_copy to print elements without consecutive entries that differ by one
7.Copy standard input to standard output while compressing spaces