Solutionunvalidated

create an auxiliary list with the indices of the letters that are smaller than `t[i]` — Then use simple math to determine how many subsequences you can form using the ranges between the indices in `x`. Tension: You can form `3C1+3C2+3C3=6` subsequences, but you’ll have to subtract the subsequences for `[0-0]` (already counted) and `[1-1]` (not included). Outcome: that gives us `1+4=5` subsequences.

395e346f-a6f9-46de-a43c-4e122ede686f

create an auxiliary list with the indices of the letters that are smaller than t[i] — Then use simple math to determine how many subsequences you can form using the ranges between the indices in x. Tension: You can form 3C1+3C2+3C3=6 subsequences, but you’ll have to subtract the subsequences for [0-0] (already counted) and [1-1] (not included). Outcome: that gives us 1+4=5 subsequences.