title: Finding the maximum subsequence binary sets that have an equal number of 1s and 0s
body: <p>I found the following problem on the internet, and would like to know how I would go about solving it:</p>
  
  <blockquote>
    <p>You are given an array ' containing 0s and 1s. Find O(n) time and O(1) space algorithm to find the maximum sub sequence which has equal number of 1s and 0s.</p>
    
    <p>Examples:</p>
    
    <ol>
    <li><code>10101010</code> -
    The longest sub sequence that satisfies the problem is the input itself</li>
    <li><code>1101000</code> -
    The longest sub sequence that satisfies the problem is 110100 </li>
    </ol>
  </blockquote>