C++ simple solution, 98%
Run-time is O(nlogn + mlogm). The idea is to first figure out how many tables and dishes there are, then assign them i and j indices in a vector, saved using a 
Run-time is `O(nlogn + mlogm)`. The idea is to first figure out how many tables and dishes there are, then assign them `i` and `j` indices in a vector, saved using a map, using the required ordering. Then, go through the orders again and increment each `res[ind[table]][ind[dish]]` for each order.\n\n```\nstruct Cmp {\n    inline bool operator() (const string& a, const string& b) const {\n        return stoi(a) < stoi(b);\n    }\n};\n\nclass Solution {\npublic:\n    vector<vector<string>> displayTable(vector<vector<string>>& orders) {\n        std::set<string, Cmp> mT;\n        std::set<string> mD;\n        for(const auto &o: orders) mT.insert(o[1]), mD.insert(o[2]);\n        std::unordered_map<string, int> mTT, mDD;\n        \n        int R{1};\n        for(const auto &s: mT) mTT[s] = R++;\n        \n        int C{1};\n        for(const auto &s: mD) mDD[s] = C++;\n        \n        std::vector<std::vector<string>> res(R, std::vector<string>(C, "0"));\n        res[0][0] = "Table";\n        int i{1}, j{1};\n        for(const auto &t: mT) res[i++][0] = t;\n        for(const auto &d: mD) res[0][j++] = d;\n        for(const auto &o: orders) {\n            auto &s = res[mTT[o[1]]][mDD[o[2]]];\n            int tmp = stoi(s);\n            s = to_string(++tmp);\n        }\n        return res;\n    }\n};\n```
[]