Vector-Sort

  • + 0 comments
    int main() {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT */  
        int size;
        cin>>size;
        vector<int> v;
        int ele;
        for(int i=0; i<size; i++)
        {
            cin>>ele;
            v.push_back(ele); 
        }
        sort(v.begin(), v.end());
        for(auto i=v.begin(); i!=v.end(); i++)
        {
            cout<<*i<<" "; 
        }
        return 0;
    }