solve Distinct Subsequences