If the vowel at the current index comes right after the last vowel in the subsequence , we have two options : either to add the vowel in the subsequence , or move on to next character . We choose the one which gives the longest subsequence .
elif ( mapping [ subList [ - 1 ] ] + 1 ) == mapping [ string [ index ] ] : NEW_LINE INDENT sub1 = longestSubsequence ( string , subList +   \ [ string [ index ] ] , index + 1 ) NEW_LINE sub2 = longestSubsequence ( string , subList , index + 1 ) NEW_LINE if len ( sub1 ) > len ( sub2 ) : NEW_LINE INDENT return sub1 NEW_LINE DEDENT else : NEW_LINE INDENT return sub2 NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT return longestSubsequence ( string , subList , index + 1 ) NEW_LINE DEDENT