distinct subsequence

504ms
timeout
distinctive sequence - dp solution

500ms
548ms