Wildcard Matching - C# Solution
C# Solution:\r\n\r\n# Code\r\nC#\r\npublic class Solution\r\n{\r\n    public bool IsMatch(string s, string p)\r\n    {\r\n        var i = 0;\r\n        var j = 
C# Solution:\r\n\r\n# Code\r\n```C#\r\npublic class Solution\r\n{\r\n    public bool IsMatch(string s, string p)\r\n    {\r\n        var i = 0;\r\n        var j = 0;\r\n        var star = -1;\r\n        var m = -1;\r\n\r\n        while (i < s.Length)\r\n        {\r\n            if (j < p.Length && (p[j] == \'?\' || p[j] == s[i]))\r\n            {\r\n                i++;\r\n                j++;\r\n\r\n                continue;\r\n            }\r\n\r\n            if (j < p.Length && p[j] == \'*\')\r\n            {\r\n                star = j++;\r\n                m = i;\r\n\r\n                continue;\r\n            }\r\n\r\n            if (star >= 0)\r\n            {\r\n                j = star + 1;\r\n                i = ++m;\r\n\r\n                continue;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        while (j < p.Length && p[j] == \'*\')\r\n        {\r\n            j++;\r\n        }\r\n\r\n        return j == p.Length;\r\n    }\r\n}\r\n```
['C#']