c++ | using queue
\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n       queue<int>  q;\n        q.push(0);\n        for(int i=1;i<s.length(
```\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n       queue<int>  q;\n        q.push(0);\n        for(int i=1;i<s.length();i++)\n        {\n            if(s[i]==\'0\')\n            {\n                while(!q.empty() and i-q.front()>maxJump)\n                    q.pop();\n                if(q.empty())\n                    return 0;\n                int diff=i-q.front();\n                if(i==s.length()-1 and diff<=maxJump and diff>=minJump)\n                    return 1;\n                if(diff>=minJump)\n                    q.push(i);       \n            }\n        }\n        return 0;\n    }\n};\n```
['C', 'C++']