Java solution -> calculate necessary parts first
Intuition\nCalculate the necessary number of parts, then fill in the array.\n\n# Approach\nFirst try to use only one part, then allocate the remaining message e
# Intuition\nCalculate the necessary number of parts, then fill in the array.\n\n# Approach\nFirst try to use only one part, then allocate the remaining message evenly respect to the needed suffix size. Keep on trying with increasing number of parts until we find the right number to eliminate all the message (no remainings).\n\nAssembling the array is trivial.\n\n# Complexity\n- Time complexity:\nO(n) - the worst case when you need to allocate the message into parts one character at a time\n\n- Space complexity:\nO(n)\n\n# Code\n```\nclass Solution {\n    private String message;\n    private int limit;\n\n    public String[] splitMessage(String message, int limit) {\n        /* Not enough space for even smallest suffix */\n        if (limit - 5 <= 0) {\n            return new String[0];\n        }\n        this.message = message;\n        this.limit = limit - 3;\n        \n        int n = 1;\n        int parts = calcPartsNum(n);\n        while (n < parts) {\n            n = parts;\n            parts = calcPartsNum(n);\n        }\n        \n        /* Suffix hit limit or went above it */\n        if (parts <= 0) {\n            return new String[0];\n        }\n\n        return assembleMessageArray(parts);\n    }\n\n    private int calcPartsNum(int n) {\n        int numbers = String.valueOf(n).length();\n        int remainingMessageLength = message.length();\n        int currentSuffixLength = 1 + numbers;\n        int partNum = 0;\n        for (int i = 1; i < numbers; ++i) {\n            int currParts = (int)(Math.pow(10, i) - Math.pow(10, i - 1));\n            partNum += currParts;\n            remainingMessageLength -= currParts * (this.limit - currentSuffixLength);\n            currentSuffixLength += 1;\n            if (this.limit - currentSuffixLength <= 0) {\n                return 0;\n            }\n        }\n        remainingMessageLength -= (n - partNum) * (this.limit - currentSuffixLength);\n        return n + (int)Math.ceil((double)remainingMessageLength / (this.limit - currentSuffixLength));\n    }\n\n    private String[] assembleMessageArray(int n) {\n        String[] ret = new String[n];\n        for (int i = 1, index = 0; i <= n; ++i) {\n            int currLength = this.limit - String.valueOf(i).length() - String.valueOf(n).length();\n            if (index + currLength >= this.message.length()) {\n                currLength = this.message.length() - index;\n            }\n            ret[i - 1] = this.message.substring(index, index + currLength) + "<" + String.valueOf(i) + "/" + String.valueOf(n) + ">";\n            index += currLength;\n        }\n        return ret;\n    }\n}\n```
['Java']