Python binary search solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution(object):\n    def splitMessage(self, message, limit):\n        """\n        :type message: str\n        :type limit: int\n        :rtype: List[str]\n        """\n\n        def can_split_with_parts(num_parts: int) -> list[str]:\n            parts = []\n            idx = 0\n            \n            # Loop through each part from 1 to num_parts and build the message parts\n            for i in range(1, num_parts + 1):\n                suffix = f"<{i}/{num_parts}>"\n                suffix_len = len(suffix)\n                available_len = limit - suffix_len  # Available space for message\n                \n                if available_len <= 0:\n                    return []  # Invalid, no space left for the message content\n                \n                # Cut the message up to the available length\n                part = message[idx:idx + available_len]\n                \n                # If the part + suffix exceeds the limit, return an empty list\n                if len(part) + suffix_len > limit:\n                    return []\n                \n                parts.append(part + suffix)\n                idx += len(part)\n            \n            # If all characters in the message were used, return the parts\n            return parts if idx == len(message) else []\n\n        # Perform binary search over the number of parts\n        low, high = 1, len(message)\n        result = []\n        cache_9 = defaultdict(bool)\n        while low <= high:\n            mid = (low + high) // 2\n            candidate = can_split_with_parts(mid)\n            \n            if candidate:\n                result = candidate  # Found a valid solution, try fewer parts incl 1\n                high = mid - 1\n                low = 1\n            else:\n                #if you dont find a candidate, maybe the number just below its 10**numdigits ie 9 or 99 or 999 or 9999... etc could be a candidate and we might miss the left space if we dont consider those\n                num_digits = len(str(abs(mid)))\n                if num_digits in cache_9 :\n                    high = 10**(num_digits-1)-1\n                else:\n                    candidate = can_split_with_parts(10**(num_digits-1)-1)\n                    if candidate:\n                        high = 10**(num_digits-1)-1\n                        cache_9[num_digits] = True\n                    else:\n                        low = mid + 1  # No valid solution, need more parts\n        return result\n\n\n\n\n\n\n        \n        \n```
['Python3']