Why not just simply counting from 1 to 4?
Intuition\nThe only thing unknown is how many parts will be there. However, we don\'t need to know that ahead of time. The only reason we cannot determine the h
# Intuition\nThe only thing unknown is how many parts will be there. However, we don\'t need to know that ahead of time. The only reason we cannot determine the how many non-suffix space a part could take is unknown of the LENGTH of total parts, but we can use placeholder for this unknown. Since the message length is less than 10^4, there are only 4 placeholders possible. "-", "--", "---", "----", for example, "<1/--->"\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n4 * O(n) = O(n)\n\n- Space complexity:\nO(n)\n\n# Code\n```\nclass Solution:\n    def splitMessage(self, message: str, limit: int) -> List[str]:\n        n = len(message)\n\n        def createValid(digits):\n            res = []\n            i, idx = 0, 1\n            placeholder = digits * "-"\n            \n            while i < n:\n                if len(res) >= 10 ** digits: return []\n                suffix = "<" + str(idx) + "/" + placeholder + ">"\n                remaining = limit - len(suffix)\n                if remaining < 0:\n                    return []\n                res.append(message[i:min(n, i+remaining)] + suffix)\n                i += remaining\n                idx += 1\n            \n            count = str(len(res))\n            if len(count) == digits:\n                for j in range(len(res)):\n                    res[j] = res[j].replace(placeholder, count)\n                return res\n\n            return []\n        \n        for i in range(1, 5):\n            res = createValid(i)\n            if res: return res\n        \n        return []\n\n```
['Python3']