Find the denominator first
IntuitionHardest part of the problem is finding the denominator. We do this itertively checking if denomminator is 1 digit,.. 2 digit, .. n digit.Added some che
# Intuition
Hardest part of the problem is finding the denominator. We do this itertively checking if denomminator is 1 digit,.. 2 digit, .. n digit.

Added some checks to return early.

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
O(log(length(n))) - almost O(1)

- Space complexity:
O(1) if result is excluded

# Code
```python3 []
class Solution:
    def splitMessage(self, message: str, limit: int) -> list[str]:
        if limit <= 5:
            return []
        l = len(message)

        def messageSizeLog10() -> int:
            possibleSegments = [9]
            while True:
                strLen = l
                possibleSegmentsLessThan = possibleSegments[-1]
                if possibleSegmentsLessThan > strLen * 10:
                    return 0
                denominatorSize = len(str(possibleSegmentsLessThan))
                syntaxLength = 3

                for s in possibleSegments:
                    numeratorSize = len(str(s))
                    strLen -= (
                        limit - numeratorSize - denominatorSize - syntaxLength
                    ) * s
                    if strLen <= 0:
                        return denominatorSize

                possibleSegments.append(possibleSegments[-1] * 10)

        denominatorSize = messageSizeLog10()
        if denominatorSize == 0:
            return []
        messageList = []
        numerator = 1
        cursor = 0
        while cursor < l:
            numeratorSize = len(str(numerator))
            syntaxSize = numeratorSize + denominatorSize + 3
            messageSize = limit - syntaxSize
            thisMessage = message[cursor : cursor + messageSize]
            messageList.append((thisMessage, numerator))
            cursor = cursor + messageSize
            numerator += 1

        denominator = str(numerator - 1)
        res = []
        for m in messageList:
            [message, thisNumerator] = m
            formattedMessage = f"{message}<{thisNumerator}/{denominator}>"
            res.append(formattedMessage)
        return res
```
['Python3']