title: Sub-sequence of Vowels
body: <p>I was practicing for an interview and came across this question on a website: </p>
  
  <blockquote>
    <p>A magical sub-sequence of a string <code>S</code> is a sub-sequence of <code>S</code> that
    contains all five vowels in order. Find the length of largest magical sub-sequence of a string <code>S</code>. </p>
    
    <p>For example, if <code>S = aeeiooua</code>, then <code>aeiou</code> and <code>aeeioou</code> are magical sub-sequences
    but <code>aeio</code> and <code>aeeioua</code> are not.</p>
  </blockquote>
  
  <p>I am a beginner in dynamic programming and am finding it hard to come up with a recursive formula for this. </p>