#115

Distinct Subsequences

hard· 2-D DPruns: 0

Given two strings s and t, return the number of distinct subsequences of s which equals t. A subsequence of a string is a new string formed from the original by deleting some characters without changing the relative order of the remaining characters. The test cases are generated so the answer fits in a 32-bit integer.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.