[Java] Easy 100% Dynamic Programming + Sliding Window solution
java\nclass Solution {\n    public boolean canReach(String s, int minJump, int maxJump) {\n        if(s.charAt(s.length() - 1) == \'1\')\n            return fal
```java\nclass Solution {\n    public boolean canReach(String s, int minJump, int maxJump) {\n        if(s.charAt(s.length() - 1) == \'1\')\n            return false;\n\n        boolean[] positions = new boolean[s.length()];\n\n        positions[0] = true;\n\n        int start = 0, end = 0;\n\n        for(int i = 0; i < s.length(); ++i) {\n            if(!positions[i])\n                continue;\n\n            start = Math.max(i + minJump, end + 1);\n            end = Math.min(i + maxJump, s.length() - 1);\n\n            for(int j = start; j <= end; ++j)\n                if(s.charAt(j) == \'0\')\n                    positions[j] = true;\n\n            if(positions[positions.length - 1])\n                return true;\n        }\n\n        return positions[positions.length - 1];\n    }\n}\n```
['Java']