title: Python: get the minimum length of space that captures all the non zero values of an array with looping allowed
body: <p>Examples:</p>
  <p>1)</p>
  <pre><code> v                 v
  [1,0,0,1,1,1,1,0,1,1,0,0,0]
   ^                 ^
  </code></pre>
  <p>would return a result of 10 as this is the <code>minimum length</code> of space between the first instance of a nonzero value and the last (bolded).
  If we instead considered the following:</p>
  <pre><code>                 v v
  [1,0,0,1,1,1,1,0,1,1,0,0,0] 
                   ^ ^
  </code></pre>
  <p>and looped to capture all the nonzero values, the length of space would be 13 so 10 is our answer.</p>
  <p>2)</p>
  <pre><code>     v             v
  [0,0,1,0,0,0,0,0,0,1,1]
       ^             ^
  </code></pre>
  <p>would return a result of 5 since looping is allowed. If we instead considered the following:</p>
  <pre><code>     v               v
  [0,0,1,0,0,0,0,0,0,1,1] 
       ^               ^
  </code></pre>
  <p>and did not loop, the length of space would be 9 so 5 is our answer.</p>