<p>You are given a <strong>0-indexed</strong> binary string <code>s</code> and two integers <code>minJump</code> and <code>maxJump</code>. In the beginning, you are standing at index <code>0</code>, which is equal to <code>&#39;0&#39;</code>. You can move from index <code>i</code> to index <code>j</code> if the following conditions are fulfilled:</p>

<ul>
	<li><code>i + minJump &lt;= j &lt;= min(i + maxJump, s.length - 1)</code>, and</li>
	<li><code>s[j] == &#39;0&#39;</code>.</li>
</ul>

<p>Return <code>true</code><i> if you can reach index </i><code>s.length - 1</code><i> in </i><code>s</code><em>, or </em><code>false</code><em> otherwise.</em></p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> s = &quot;<u>0</u>11<u>0</u>1<u>0</u>&quot;, minJump = 2, maxJump = 3
<strong>Output:</strong> true
<strong>Explanation:</strong>
In the first step, move from index 0 to index 3. 
In the second step, move from index 3 to index 5.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> s = &quot;01101110&quot;, minJump = 2, maxJump = 3
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>2 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
	<li><code>s[i]</code> is either <code>&#39;0&#39;</code> or <code>&#39;1&#39;</code>.</li>
	<li><code>s[0] == &#39;0&#39;</code></li>
	<li><code>1 &lt;= minJump &lt;= maxJump &lt; s.length</code></li>
</ul>

class Solution:
    def canReach(self, s: str, minJump: int, maxJump: int) -> bool:
        # If last digit is 1, can't ever land on there, so always False
        if s[ -1 ] == '1':
            return False
        # If there's any run of 1's (forbidden to jump to) that's longer
        # than maxJump, can't ever jump around it, so always False
        if s[ 0 ] == '0':
            i1 = s.find( '1' )
            if i1 < 0:
                proceed = False
            else:
                proceed = True
        else:
            i1 = 0
            proceed = True
        while proceed:
            i0 = s.find( '0', i1 + 1 )
            if i0 < 0:    # No more 0's?
                l1 = len( s )
                if l1 + 1 > maxJump:
                    # print( "False 1" )
                    return False
            else:
                l1 = i0 - i1
                if l1+ 1 > maxJump:
                    # print( "False 2" )
                    return False
                i1 = s.find( '1' , i0 + 1 )
                if i1 < 0:
                    break
        pass
        self.s = s
        self.n = len(s)
        self.minJump = minJump
        self.maxJump = maxJump
        index = 0
        result = self.cRrec(index)
        return result

    @lru_cache( 2_000_000 )
    def cRrec(self, index):
        # Base case
        if index >= self.n - 1:
            result = True
        # Recursion cases
        else:
            result = False
            # Try jumping between minJump and maxJump (inclusive)
            # indices forward:
            max_jump = min( self.maxJump, self.n - 1 - index )
            for jump in range( self.minJump, max_jump + 1 ):
                next_index = index + jump
                if self.s[next_index] == '0':
                    result |= self.cRrec(next_index)
                    if result:
                        break
        return result

563