Easy Java Solution
```\n\tprivate static List> displayTable(List> orders) {\n\t\tList tableList = new ArrayList<>();\n\t\tSet dishSet = new HashSet<>();\n\t\tHashMap> table = new 
```\n\tprivate static List<List<String>> displayTable(List<List<String>> orders) {\n\t\tList<Integer> tableList = new ArrayList<>();\n\t\tSet<String> dishSet = new HashSet<>();\n\t\tHashMap<Integer, HashMap<String, Integer>> table = new HashMap<>();\n\n\t\tfor (List<String> order: orders) {\n\t\t\tint tableNo = Integer.parseInt(order.get(1));\n\t\t\tString dish = order.get(2);\n\t\t\tdishSet.add(dish);\n\n\t\t\tif (table.containsKey(tableNo)) {\n\t\t\t\tHashMap<String, Integer> orderMap = table.get(tableNo);\n\t\t\t\torderMap.put(dish, orderMap.getOrDefault(dish, 0) + 1);\n\t\t\t} else {\n\t\t\t\tHashMap<String, Integer> orderMap = new HashMap<>();\n\t\t\t\torderMap.put(dish, 1);\n\t\t\t\ttable.put(tableNo, orderMap);\n\t\t\t\ttableList.add(tableNo);\n\t\t\t}\n\t\t}\n\t\ttable.forEach((k, v) -> System.out.println(k+ " -> " +v));\n\t\tCollections.sort(tableList);\n\t\tList<String> dishList = new ArrayList<>(dishSet);\n\t\tCollections.sort(dishList);\n\t\tdishList.add(0, "Table");\n\n\t\tSystem.out.println(tableList);\n\t\tSystem.out.println(dishList);\n\t\tList<List<String>> ans = new ArrayList<>();\n\t\tans.add(dishList);\n\t\tfor (int i = 0; i<tableList.size(); i++) {\n\t\t\tList<String> row = new ArrayList<>();\n\t\t\tint tableNo = tableList.get(i);\n\t\t\trow.add(""+tableNo);\n\t\t\tHashMap<String, Integer> orderMap = table.get(tableNo);\n\t\t\tfor (int j = 1; j<dishList.size(); j++) {\n\t\t\t\tString dish = dishList.get(j);\n\t\t\t\tif (orderMap.containsKey(dish)) {\n\t\t\t\t\trow.add(orderMap.get(dish).toString());\n\t\t\t\t} else {\n\t\t\t\t\trow.add("0");\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(row);\n\t\t}\n\t\treturn ans;\n\t}
[]