Technology Sharing

Practice questions Day 48 | 115. Different subsequences, 583. Deletion operation of two strings, 72. Edit distance

2024-07-11

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

115. Different Subsequences

115. Different Subsequences - LeetCode

Idea: dp[i][j]: the number of t ending with j-1 in the subsequence of s ending with i-1. dp[i][j] still considers two cases:

s[i - 1] ==