leetcode-master
leetcode-master copied to clipboard
勘误
https://github.com/youngyangyang04/leetcode-master/blob/fbf2e280294b97cc560529cb3f584887312efda9/problems/0047.%E5%85%A8%E6%8E%92%E5%88%97II.md?plain=1#L78
应该是
if (i > 0 && nums[i] == nums[i - 1] && used[i - 1] == true)
https://github.com/youngyangyang04/leetcode-master/blob/fbf2e280294b97cc560529cb3f584887312efda9/problems/0053.%E6%9C%80%E5%A4%A7%E5%AD%90%E5%BA%8F%E5%92%8C%EF%BC%88%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%EF%BC%89.md?plain=1#L75
如果nums只包含一个元素,应该返回nums[0]而不是0
https://github.com/youngyangyang04/leetcode-master/blob/49e1ab2b575e6a52f79f1d5b8693a575573e3240/problems/0115.%E4%B8%8D%E5%90%8C%E7%9A%84%E5%AD%90%E5%BA%8F%E5%88%97.md?plain=1#L48
表述错误,此时考虑的是若使用s[i-1]和t[j-1]匹配,则在以i-1为结尾的s子序列中出现以j-1为结尾的t的个数
等价于以i-2为结尾的s子序列中出现以j-2为结尾的t的个数