✔️ 100% Fastest Swift Solution
\nclass Solution {\n    func minWindow(_ s: String, _ t: String) -> String {\n        guard s.count >= t.count else { return "" }\n        \n        let sChars 
```\nclass Solution {\n    func minWindow(_ s: String, _ t: String) -> String {\n        guard s.count >= t.count else { return "" }\n        \n        let sChars = Array(s)\n        let tChars = Array(t)\n        \n        let indexs = validIndexs(sChars, tChars)\n        guard s.count >= t.count else { return "" }\n        \n        let target = targetChars(tChars)\n        let firstMatchIndex = firstMatch(sChars, indexs, target) \n        var start = firstMatchIndex.0\n        var end = firstMatchIndex.1\n        \n        if end == -1 {\n            return ""\n        }\n        \n        var tmp: [Character: Int] = [:]\n        for i in indexs {\n            if i < indexs[start] {\n                continue\n            }\n            \n            if i > indexs[end] {\n                break\n            }\n            \n            let c = sChars[i]\n            if let _ = tmp[c] {\n                tmp[c]! += 1 \n            \n            } else {\n                tmp[c] = 1\n            }\n        }\n        \n        var minLength = indexs[end] - indexs[start]\n        var minStart = start\n        \n        while end < indexs.count {\n            //  start +1\n            let c = sChars[indexs[start]]\n            \n            if tmp[c]! > target[c]! {\n                start += 1\n                tmp[c]! -= 1\n                let currentLength = indexs[end] - indexs[start]\n                minLength = minLength < currentLength ? minLength : currentLength\n                minStart = minLength < currentLength ? minStart : start\n                continue\n            \n            } else {\n                start += 1\n                tmp[c]! -= 1\n                end += 1\n                while end < indexs.count {\n                    let e = sChars[indexs[end]]\n                    tmp[e]! += 1\n                    if e == c {\n                        let currentLength = indexs[end] - indexs[start]\n                        minLength = minLength < currentLength ? minLength : currentLength\n                        minStart = minLength < currentLength ? minStart : start\n                        break\n                    }\n                    end += 1\n                }  \n            }\n        }\n        \n        return Array(sChars[indexs[minStart]...indexs[minStart] + minLength]).join("")\n    }\n\n    \n    func firstMatch(_ s: [Character], _ indexs: [Int], _ target: [Character: Int]) -> (Int, Int) {\n        var target = target\n        var tmp = -1\n        \n        func reachTarget() -> Bool {\n            var res = true\n            for (_, value) in target {\n                if value > 0 {\n                    res = false\n                    break\n                }\n            }\n            return res\n        }\n        \n        for (i, index) in indexs.enumerated() {\n            target[s[index]]! -= 1\n            if reachTarget() {\n                tmp = i\n                break\n            }\n        }\n        \n        return (0, tmp)\n    }\n    \n\n    func validIndexs(_ s: [Character], _ t: [Character]) -> [Int] {\n        var res: [Int] = []\n        \n        for (i, c) in s.enumerated() {\n            if t.contains(c) { res.append(i) }\n        }\n        \n        return res\n    }\n\n    \n    func targetChars(_ t: [Character]) -> [Character: Int] {\n        var map: [Character: Int] = [:]\n        \n        for c in t {\n            if let _ = map[c] { map[c]! += 1 } else { map[c] = 1 }\n        }\n        \n        return map\n    }\n\n}\n\n\nextension Array {\n    func join(_ s: String) -> String {\n        guard self.count > 0 else { return "" }\n        if self.count == 1 { return "\\(self[0])" }\n        var string = ""\n\n        for i in 0..<self.count - 1 { string += "\\(self[i])\\(s)" }\n        \n        string += "\\(self[self.count - 1])"\n        return string\n    }\n}\n```\n\nLet me know in comments if you have any doubts. I will be happy to answer.\n\nPlease upvote if you found the solution useful.
['Swift']