Java divide stage solution
\nclass Solution {\n    public String[] splitMessage(String message, int limit) {\n        int[] stgTable = {\n                (limit - 5) * 9,\n               
```\nclass Solution {\n    public String[] splitMessage(String message, int limit) {\n        int[] stgTable = {\n                (limit - 5) * 9,\n                (limit - 6) * 9 + (limit - 7) * 90,\n                (limit - 7) * 9 + (limit - 8) * 90 + (limit - 9) * 900,\n                (limit - 8) * 9 + (limit - 9) * 90 + (limit - 10) * 900 + (limit - 11) * 9000,\n        };\n        int l = message.length(), stg = 0;\n        while (stg < stgTable.length) {\n            if (stgTable[stg] >= l) break;\n            stg++;\n        }\n        if (stg == stgTable.length) return new String[0];\n        ArrayList<String> list = new ArrayList<>();\n        int idx = 1, strIdx = 0;\n        for (int i = 0; i <= stg; i++) {\n            int size = limit - 5 - stg - i;\n            for (int j = 0; j < 9 * Math.pow(10, i) && strIdx < message.length(); j++) {\n                list.add(message.substring(strIdx, Math.min(message.length(), strIdx + size)) + "<" + idx);\n                strIdx += size;\n                idx++;\n            }\n        }\n        String[] res = list.toArray(new String[]{});\n        for (int i = 0; i < res.length; i++)\n            res[i] = res[i] + "/" + (idx - 1) + ">";\n        return res;\n    }\n}\n```
['Java']