Simple Solution in C# (LinQ)
Code\n\npublic class Solution {\n    public IList<IList<string>> DisplayTable(IList<IList<string>> orders) {\n        var food = orders.Select(x => x[2]).OrderB
# Code\n```\npublic class Solution {\n    public IList<IList<string>> DisplayTable(IList<IList<string>> orders) {\n        var food = orders.Select(x => x[2]).OrderBy(x => x, StringComparer.Ordinal).ToHashSet();\n        return (new List<List<string>>() { })\n            .Append(new List<string>() { "Table" }.Concat(food).ToList()).Concat(\n                orders.GroupBy(x => x[1],\n                                        (table, items) =>\n                                        (new List<string>() { })\n                                            .Append(table)\n                                            .Concat(food.Select(f => items.Count(item => item[2] == f).ToString()))\n                                            .ToList()\n                                ).OrderBy(x => int.Parse(x[0])).ToList()\n            ).ToList().Cast<IList<string>>().ToList();\n    }\n}\n```
['C#']