c++ solution
Intuition\nthis solution is based on @lee215\'s solution in https://leetcode.com/problems/split-message-based-on-limit/solutions/2807533/python-find-the-number-
# Intuition\nthis solution is based on @lee215\'s solution in https://leetcode.com/problems/split-message-based-on-limit/solutions/2807533/python-find-the-number-of-substrings\n\nwith small modifications and comments to help to understand.\n\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```\n// this solution is based on @lee215\'s solution in https://leetcode.com/problems/split-message-based-on-limit/solutions/2807533/python-find-the-number-of-substrings\n\nclass Solution {\npublic:\n    vector<string> splitMessage(string message, int limit) {\n        int k=0; // number of split parts\n        int indexLen=0; // total string len of all digits from 1 to k\n\n        /* find k:\n            k needs to meet the following standards:\n            1. max len of suffix can fit in limit (k needs to be small enough)-> 3+to_string(k).size()*2<limit \n            2. there is sufficient message to split to k parts with limit (k needs to be large enough) -> (curr + message.size() + \n                    (3+to_string(curr).size())*k <= limit*k \n        */\n        while( (3+to_string(k).size()*2<=limit) && \n               (indexLen + message.size() + \n                    (3+to_string(k).size())*k > limit*k)) {\n            k+=1;\n            indexLen+=to_string(k).size();\n        }\n\n        vector<string> res;\n        if(3+to_string(k).size()*2>limit) return res; // no result, return\n\n        int i=0; // pointer of message, starting from 0\n        for(int j=1; j<=k; ++j) {\n            int len = limit-(to_string(j).size() + to_string(k).size()+3);\n            res.emplace_back(message.substr(i, len) + \n                    "<" + to_string(j) + "/" + to_string(k) + ">");\n            i+=len;\n        }\n        return res;\n    }\n};\n```
['C++']