#include #include #include using namespace std ; int main() { vector v1 ; set set1 ; v1.push_back( 4 ) ; v1.push_back( 2 ) ; v1.push_back( 4 ) ; v1.push_back( 1 ) ; v1.push_back( 2 ) ; for( int x1 : v1 ) cout << x1 << " " ; cout << endl ; //Remove duplicates in v1 . Keep the order the same. //Do not use any other data structures like vector // other than v1 and set1 defined above. //Do not use nested loops. Only 1 loop for( int x1 : v1 ) cout << x1 << " " ; cout << endl ; return 0; }