Binary search for optimal split
\nclass Solution:\n    def getsuffixes(self, n):\n        return [f"<{i}/{n}>" for i in range(1, n + 1)]\n    \n    def splitMessage(self, message: str, limit: 
```\nclass Solution:\n    def getsuffixes(self, n):\n        return [f"<{i}/{n}>" for i in range(1, n + 1)]\n    \n    def splitMessage(self, message: str, limit: int) -> List[str]:\n        n = len(message)\n        if n + 5 <= limit:\n            return [f"{message}<1/1>"]\n        beg = 1\n        end = n\n        finalres = []\n        while beg <= end:\n            l = (beg + end) // 2\n            suff = self.getsuffixes(l)\n            res = []\n            i = 0\n            for j in range(l):\n                k = limit - len(suff[j])\n                res.append(f"{message[i : i + k]}{suff[j]}")\n                i += k\n            if i < n:\n                beg = l + 1\n            elif len(res[-2]) != limit:\n                end = l - 1\n            else:\n                finalres = res\n                break\n        return finalres\n```
['Python']