C++ || 100% TIME || Sweep Line || Easy-to-understand
\n    bool canReach(string s, int minJump, int maxJump) {\n        int len = s.length();\n        if (s[len - 1] == \'1\') return false;\n        vector<int> sw
```\n    bool canReach(string s, int minJump, int maxJump) {\n        int len = s.length();\n        if (s[len - 1] == \'1\') return false;\n        vector<int> sweep(len, 0);\n        sweep[0] = 1;\n        sweep[1] = -1;\n        int cur = 0;\n        for (int i = 0; i < s.length(); ++i) {\n            cur += sweep[i];\n            if (s[i] == \'1\' || cur <= 0) continue;\n            if (len - 1 >= i + minJump && len - 1 <= i + maxJump) return true;\n            if (i + minJump < len) ++sweep[i + minJump];\n            if (i + maxJump + 1 < len) --sweep[i + maxJump + 1];\n        }\n        return false;\n    }\n```
['C']