Distinct Subsequences — 2-D DP

Count how many ways a short code pattern can be picked out of a longer event log by deleting entries, reporting zero if impossible.

2-D DP · Hard

More in 2-D DP

All algorithm problems