Java 2 Solutions - TreeSet O(nlogn) & Deque O(n)
Java TreeSet\n\npublic boolean canReach(String s, int minJump, int maxJump) {\n        int i = 0;\n        TreeSet<Integer> ts = new TreeSet();\n        ts.add(
Java TreeSet\n```\npublic boolean canReach(String s, int minJump, int maxJump) {\n        int i = 0;\n        TreeSet<Integer> ts = new TreeSet();\n        ts.add(0);\n        while(++i < s.length()){\n            if(s.charAt(i) == \'0\'){\n                Integer lower = ts.floor(i-minJump);\n                if(lower != null && lower+maxJump >= i){\n                    ts.add(i);\n                }\n            }\n        }\n        return ts.last() == s.length()-1;\n    }\n```\n\nTime: O(nlogn)\n\n-----------------------------------------\nJava Deque\n```\npublic boolean canReach(String s, int minJump, int maxJump) {\n        int i = 0;\n        Deque<Integer> q = new ArrayDeque();\n        q.add(0);\n        while(++i < s.length()){\n            while(!q.isEmpty() && q.peek() < i-maxJump){\n                q.poll();\n            }\n            if(s.charAt(i) == \'0\' && !q.isEmpty() && q.peek() <= i-minJump){\n                q.add(i);\n            }\n        }\n        return !q.isEmpty() && q.peekLast() == s.length()-1;\n    }\n```\n\nTime: O(n)
[]