The Full Counting Sort

  • + 0 comments

    This task has the most lack of understandable description in easy way, through 75 of previous tasks. c++

    void countSort(vector<vector<string>> arr) {
        const int n = arr.size();
        multimap<int, string> m;
        
        for (int i = 0; i < n; ++i)
        {
            m.emplace(stoi(arr[i][0]), i < n / 2 ? "-" : arr[i][1]);
        }
        
        for (const auto& p : m)
        {
            cout << p.second << ' ';
        }
    }