leetcode97专题

LeetCode97. Interleaving String——动态规划

文章目录 一、题目二、题解 一、题目 Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2. An interleaving of two strings s and t is a configuration where s and t are divid

leetcode97. 交错字符串

给定三个字符串 s1, s2, s3, 验证 s3 是否是由 s1 和 s2 交错组成的。 示例 1: 输入: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac” 输出: true 示例 2: 输入: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbbaccc” 输出: false 二维动态规划: class Solu