✅ [Python] binary search is redundant, just brute force it (explained)
\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.\n*\nThis solution employs a brute force approach to find the minimal number of parts needed to split the string
**\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n****\nThis solution employs a brute force approach to find the minimal number of parts needed to split the string into parts of limited length with appended suffixes. Time complexity is linear: **O(N)**. Space complexity is linear: **O(N)**.\n\n**Comment.** Given the boundaries for this problem, i.e. `len(message) <= 10000`, and considering the fact that the minimal size of each part is `len("_<1/1>") = 6`, we colcude that the maximal number of iterations in case of using a brute-force approach is `10000 / 6 = 1667`. That\'s very cheap for a linear scan, so let\'s brute force the number of parts `p` then use it to format a list of parts.\n\n**Python.**\n```\nclass Solution:\n    def splitMessage(self, msg: str, lim: int) -> List[str]:\n        \n        def sz(n) : return len(str(n))                       # a helper function to get a number of digits\n        \n        p = a = 1                                            # a number of parts and a total length of a-indices\n        \n        while p * (sz(p) + 3) + a + len(msg) > p * lim:      # [1] check that current number of parts is not enough...\n            if 3 + sz(p) * 2 >= lim : return []              # [2] ...or break if the separation is not possible\n            p += 1                                           # [3] try an increased number of parts\n            a += sz(p)                                       # [4] also, increase the total length of a-indices\n        \n        parts = []                                           # [5] at this point, we either obtained the minimal number \n                                                             #     of parts \'p\' or have returned an empty list \n        for i in range(1,p+1):\n            j = lim - (sz(p)+sz(i)+3)                        # [6] for each part, find how many symbols to bite off \n            part, msg = msg[0:j], msg[j:]                    # [7] bite off a piece of string...\n            parts.append(f"{part}<{i}/{p}>")                 # [8] ...and format a suffix-tagged part\n            \n        return parts\n```
[]