[C++] simple solution
\nclass Solution {\npublic:\n    vector<vector<string>> displayTable(vector<vector<string>>& orders) {\n        vector<vector<string> > ans;\n        int n=orde
```\nclass Solution {\npublic:\n    vector<vector<string>> displayTable(vector<vector<string>>& orders) {\n        vector<vector<string> > ans;\n        int n=orders.size();\n        int m=orders[0].size();\n        if(!n || !m) return ans;\n        \n        map<int,unordered_map<string,int> > mp; //2D map\n        set<string> dishes;                     //set for sorting\n        for(auto v: orders){\n            dishes.insert(v[2]);\n            mp[stoi(v[1])][v[2]]++;            \n        }\n        //inserting first row to the ans\n        vector<string> heading(dishes.begin(),dishes.end());\n        heading.insert(heading.begin(),"Table");  \n        ans.push_back(heading);\n        for(auto p: mp) {\n            vector<string> row;\n            row.push_back(to_string(p.first));\n            for(string s: dishes){\n                row.push_back(to_string(p.second[s]));\n            }\n            ans.push_back(row);\n        }\n        return ans;\n    }\n};\n```
['C', 'C++']