naive solution for Distinct Subsequences