title: find the longest non decreasing sub sequence
body: <p>given a string consists only of 0s and 1s say <strong>10101</strong><br>
  how to find the length of the longest non decreasing sub-sequence??<br>
  for example,  </p>
  
  <blockquote>
    <p>for the string,<br>
    10101</p>
  </blockquote>
  
  <p>the longest non decreasing sub sequences are  </p>
  
  <ul>
  <li>111</li>
  <li>001<br>
  so you should output 3</li>
  </ul>
  
  <blockquote>
    <p>for the string<br>
    101001 </p>
  </blockquote>
  
  <p>the longest non decreasing sub sequence is  </p>
  
  <ul>
  <li>0001  </li>
  </ul>
  
  <p>so you should output 4<br>
  how to find this??  </p>
  
  <blockquote>
    <blockquote>
      <p>how can this be done when we are provided with limits.<strong>sequence between the limit</strong><br>
      for example<br>
      101001<br>
      limits [3,6]<br>
      the longest non decreasing sub sequence is  </p>
      
      <ul>
      <li>001<br>
      so you should output 3</li>
      </ul>
    </blockquote>
  </blockquote>
  
  <p><strong>can this be achieved in o(strlen)</strong></p>