C++ || easy to understand with hashmap set
class Solution {\npublic:\n    vector> displayTable(vector>& O) \n    {\n        unordered_map > mp;\n        set s;\n        set fm;\n      \n        for(auto 
class Solution {\npublic:\n    vector<vector<string>> displayTable(vector<vector<string>>& O) \n    {\n        unordered_map<string,unordered_map<string,int> > mp;\n        set<int> s;\n        set<string> fm;\n      \n        for(auto i: O)\n        {\n                string si =i[1];\n    stringstream geek(si);\n \n    int x = 0;\n    geek >> x;\n                  s.insert(x);\n                fm.insert(i[2]);\n                mp[i[1]][i[2]]++;\n            \n        }\n        \n        vector<vector<string>> v;\n      \n       \n            vector<string> x;\n            x.push_back("Table");\n            for(auto j: fm)\n            {\n                x.push_back(j);\n            }\n            v.push_back(x);\n        \n        \n        \n        for(auto i: s)\n        {\n         //   cout<<i<<endl;\n            vector<string> x;\n            x.push_back(to_string(i));\n            for(auto j: fm)\n            {\n                x.push_back(to_string(mp[to_string(i)][j]));\n            }\n            v.push_back(x);\n        }\n        return v;\n    }\n};
['Ordered Set']