Java simple O(n) single pass with EXPLANATION
For every element there is a jumpable range, "a window". \nThe trick is to maintain all the reachable positions within that window in a structure(queue) and kee
For every element there is a jumpable range, "a window". \nThe trick is to maintain all the ***reachable*** positions within that window in a structure(queue) and keep updating it as you move along the array. We ***memoize*** the solutions in a bool array.\n\nFor example - [1,1,0,1,0,0,1,0,0,1] - minJump = 2, maxJump = 4\nFor a position i, jumpable range is from i+2 to i+4\n\nThe algorithm has 3 steps - \n\n1. When we traverse the array from right to left, and reach i, a position i+5 is out of range. Check if we are maintaining this in our queue structure.. if so remove it because it\'s unreachable now.\n\n2. Since we can jump to a new position i+2 now, check if i+2 can reach the end of array. If so add it to the queue.\n\n3. Is s.charAt(i) == \'0\'? If so check if we have anything in the jumpable range that can lead to solution(queue being not empty). If yes memoize the solution in bool array\n\n\n\n```\nclass Solution {\n    public boolean canReach(String s, int min, int max) {\n        if(s.charAt(s.length() - 1) == \'1\')\n            return false;\n        \n        boolean[] dp = new boolean[s.length()];\n        dp[dp.length-1] = true;\n        Queue<Integer> q = new LinkedList<>();\n        for(int i=dp.length-2;i>=0;i--) {            \n            //remove the peek element if out of range\n            if(!q.isEmpty() && q.peek() > i+max)\n                q.remove();\n            \n            //add the new element in range to q if applicable\n            if(i+min < s.length() && dp[i+min])\n                q.add(i+min);\n            \n            //if q not empty, update dp table\n            if(!q.isEmpty() && s.charAt(i) == \'0\')\n                dp[i] = true;\n        }\n        \n        return dp[0];\n    }\n}\n```\n\nConsider upvoting if it helped you
['Dynamic Programming', 'Sliding Window']