title: Where can I use a technique from Majority Vote algorithm
body: <p>As seen in the answers to <a href="https://stackoverflow.com/q/4280450/244526">Linear time majority algorithm?</a>, it is possible to compute the majority of an array of elements in linear time and <code>log(n)</code> space.</p>
  
  <p>It was shown that everyone who sees this algorithm believes that it is a cool technique. But does the idea generalize to new algorithms? </p>
  
  <p>It seems the hidden power of this algorithm is in keeping a counter that plays a complex role -- such as "(count of majority element so far) - (count of second majority so far)". Are there other algorithms based on the same idea? </p>