C# simple coordinates parsing | 90ms 100%
Code\n\npublic class Solution {\n    public IList<string> AmbiguousCoordinates(string s) \n    {\n        var chars = s.ToCharArray();\n\n        var r = new Li
# Code\n```\npublic class Solution {\n    public IList<string> AmbiguousCoordinates(string s) \n    {\n        var chars = s.ToCharArray();\n\n        var r = new List<string>();\n\n        for(var i = 2; i < s.Length - 1; i++)\n        {\n            var l2 = GetCoordinates(s, chars, i, s.Length-1);\n\n            if(l2.Any())\n            {\n                foreach(var d1 in GetCoordinates(s, chars, 1, i))\n                    foreach(var d2 in l2)\n                        r.Add($"({d1}, {d2})");\n            }\n        }\n\n        return r;\n    }\n\n    List<string> GetCoordinates(string s, char[] chars, int l, int r)\n    {\n        List<string> list = new ();\n\n        var len = r - l;\n\n        if(len == 1) // there is only one integer variant with length = 1\n        {\n            list.Add(s[l..r]);\n\n            return list;\n        }\n\n        if(s[l] != \'0\') // wide integers should not start with zero\n        {\n            list.Add(s[l..r]);\n        }\n\n        if(s[r-1] != \'0\') // decimal should not end with zero\n        {\n            if(s[l] == \'0\') // for leading zero is only one decimal variant\n            {\n                list.Add("0." + s[(l+1)..r]);\n            }\n            else\n            {\n                var ch = chars[l..(r+1)]; // get extra space at the end for \'.\'\n\n                ch[^1] = \'.\'; // will swap \'.\' towards head and create variants\n\n                for(var i=ch.Length-1; i>1; i--)\n                {\n                    (ch[i], ch[i-1]) = (ch[i-1], ch[i]);\n\n                    list.Add(new string(ch));\n                }\n            }\n        }\n\n        return list;\n    }\n}\n```
['C#']