[C++] Hashmap and Set
I missed that the food needs to be in the alphabetical order! A quick fix was to change unordered_set into set. Perhaps, it would can be more efficient to use h
I missed that the food needs to be in the alphabetical order! A quick fix was to change `unordered_set` into `set`. Perhaps, it would can be more efficient to use hash set but sort food items before generating the table.\n\n```cpp\nvector<vector<string>> displayTable(vector<vector<string>>& orders) {\n    vector<unordered_map<string, int>> tables(501);\n    set<string> foods;\n    for (auto &v : orders) {\n        foods.insert(v[2]);\n        ++tables[stoi(v[1])][v[2]];\n    }\n    vector<vector<string>> res;\n    for (auto t = 0; t <= 500; ++t) {\n        if (t > 0 && tables[t].empty())\n            continue;\n        res.push_back(vector<string>());\n        res.back().push_back(t == 0 ? "Table" : to_string(t));\n        for (auto it = begin(foods); it != end(foods); ++it) {\n            res.back().push_back(t == 0 ? *it : to_string(tables[t][*it]));\n        }\n    }\n    return res;\n}\n```
[]