C++ solution Hashmap + Set
Please, upvote if you like it. Thanks :-)Complexity

Time complexity:
O(n * m * log(n * m))


Space complexity:
O(n * m), where n - number of tables, m - max nu
Please, upvote if you like it. Thanks :-)

# Complexity
- Time complexity:
O(n * m * log(n * m))

- Space complexity:
O(n * m), where n - number of tables, m - max number of orders per table.

# Code
```cpp []
vector<vector<string>> displayTable(vector<vector<string>>& orders) {
    map<pair<string, string>, int> mporders;
    set<string> sfood;
    set<int> tables;
    for (const auto& o : orders) {
        string table = o[1], food = o[2];
        mporders[ { table, food } ]++;
        sfood.insert(food);
        tables.insert( { stoi(table) } );
    }
    vector<vector<string>> res;
    vector<string> firstRow{ "Table" };
    for (const auto& food : sfood)
        firstRow.push_back(food);
    res.emplace_back(firstRow);
    for (const int& t : tables) {
        res.push_back( {} );
        res.back().push_back(to_string(t));
        for (const auto& food : sfood) {
            if (mporders.count( {to_string(t), food} ) > 0)
                res.back().push_back(to_string(mporders[{to_string(t), food}]));
            else
                res.back().push_back("0");
        }
    }
    return res;
}
```
['Array', 'Hash Table', 'String', 'Sorting', 'Ordered Set', 'C++']