C++| Simple Solution using queue | BFS
\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n        queue<int> q;\n        vector<bool> vis(s.size()+1,false);\n      
```\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n        queue<int> q;\n        vector<bool> vis(s.size()+1,false);\n        q.push(0);\n        vis[0]=true;\n        while(!q.empty())\n        {\n            int pos = q.front();\n            q.pop();\n            if(pos==s.size()-1)\n            return true;\n            int minpos = (pos+minJump);\n            int maxpos = min((int)(pos+maxJump),(int)(s.size()-1));\n            if(minpos<s.size() && (vis[minpos]==false || vis[maxpos]==false)){\n                if(vis[maxpos-minJump]==true)\n                 minpos = max(minpos,maxpos-minJump);\n                \n                for(int i=minpos;i<=maxpos;i++)\n                {\n                    if(s[i]==\'0\' && !vis[i])\n                    {\n                        q.push(i);\n                        vis[i]=true;\n                    }\n                    vis[i]=true;\n                }   \n            }\n        }\n        return false;\n    }\n};\n```
['Breadth-First Search', 'C']