C++ | O(N) | visited array approach
If you are at reachable index i and s[i] = \'0\', then mark vis[i+minJump] += 1 & vis[i+maxJump+1] += -1 marking the range of indices which are reachable from i
If you are at reachable index ```i``` and ```s[i] = \'0\'```, then mark ```vis[i+minJump] += 1``` & ```vis[i+maxJump+1] += -1``` marking the range of indices which are reachable from ith index. Maintain a variable reachable and keep updating it as you iterate the indices.\n1. ```reachable``` becomes 0 when a reachable range of indices ends\n2. if ith index is reachable from starting index ```reachable > 0```\n\n```\nbool canReach(string s, int minJump, int maxJump) {\n        int vis[200005] = {0};\n        vis[minJump] = 1;\n        vis[maxJump+1] = -1;\n        int reachable = 0;\n        for(int i=minJump; i<s.size(); i++) {\n            reachable += vis[i];\n            if(reachable && s[i] == \'0\') {\n                vis[i+minJump] += 1;\n                vis[i+maxJump+1] += -1; \n            }\n        }\n\n        return s[s.size()-1] == \'0\' && reachable;\n        \n    }\n\t\n\tPlease let me know if you find any mistakes in the above code :)
[]