Explained Algorithm | C++ clean code
Intuition:\n1. Need to divide string in two halves and place decimal properly in each half.\n2. Broke the string in two halves and made valid combination list o
**Intuition:**\n1. Need to divide string in two halves and place decimal properly in each half.\n2. Broke the string in two halves and made valid combination list of each half. \n3. Received two list from left half and right half - assuming size a and b respectively\n4. Now simple make (a* b) combinations of all elements present in two lists.\n\nWhere to place decimal :\n1. [0XXXX0] -> {}\n2. [0XXXXX] -> {0.XXXX}\n3. [XXXXX0] -> {XXXXX0}\n4. [XXXX] -> [XXXX]+[X.XXX]+[XX.XX]+[XXX.X] \n\n```\nclass Solution {\npublic:\n    vector<string> insertDecimal(string s){\n        int n = s.length();\n        \n        vector<string> v;\n        \n        if(n == 0)\n            return {};\n        if(n == 1)\n            return {s};\n            \n        if(s[0] == \'0\' && s[n-1] == \'0\')\n            return {};\n        if(s[0] == \'0\')\n            return {"0."+s.substr(1)};\n        if(s[n-1] == \'0\')\n            return {s};\n        v.emplace_back(s);\n        for(int i = 1; i<n; i++){\n            v.emplace_back(s.substr(0,i)+"."+s.substr(i));\n        }\n        return v;\n        \n    }\n    vector<string> ambiguousCoordinates(string s) {\n        int n = s.length();\n        vector<string> ans;\n        \n        for(int i = 1; i<n-2; i++){\n            string s1 = s.substr(1,i);\n            string s2 = s.substr(i+1,n-i-2);\n            \n            //cout<<s1<<" "<<s2<<endl;\n            \n            vector<string> v1 = insertDecimal(s1);\n            vector<string> v2 = insertDecimal(s2);\n            \n            for(string s1 : v1){\n                for(string s2 :  v2){\n                    ans.emplace_back("("+s1+", "+s2+")");\n                }\n            }\n        }\n        return ans;\n    }\n};\n```\n**Time complexity** - O(n^3)
['C', 'C++']