C++ using queue
To minimise the repeatation of range, we will only traverse from prev_zero + max to current_zero +max.\n\n\nbool canReach(string s, int mini, int maxi) {\n     
To minimise the repeatation of range, we will only traverse from prev_zero + max to current_zero +max.\n\n```\nbool canReach(string s, int mini, int maxi) {\n        queue<int> q;\n        int n=s.size();\n        q.push(0);\n        int k=0;\n        while(q.size()!=0){\n            int pos=q.front();\n            q.pop();\n            int i=max(pos+mini,k);\n            int j=min(pos+maxi,n-1);\n            while(i<=j){\n                if(s[i]==\'0\'){\n                    if(i==n-1)\n                        return true;\n                    \n                    q.push(i);\n                }\n                i++;\n            }\n            k=pos+maxi;\n        }\n        return false;\n    }\n```
['Queue', 'C']