摘要:
题目描述 Given a m x n matrix, if an element is 0, set its entire row and column to 0.Do it in place. click to show follow up. Follow up: Did you use extr 阅读全文
2021年4月5日
摘要:
题目描述 You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise顺时针方向). Follow up: Could you do this in-place? 方法 阅读全文
摘要:
题目描述 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible represen 阅读全文
摘要:
题目描述 给定三个字符串 s1, s2, s3, 验证 s3 是否是由 s1 和 s2 交错组成的。 示例 1: 输入: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" 输出: true 示例 2: 输入: s1 = "aabcc", s2 = "dbbc 阅读全文
摘要:
题目描述 给定一个字符串 S 和一个字符串 T,计算在 S 的子序列中 T 出现的个数。一个字符串的一个子序列是指,通过删除一些(也可以不删除)字符且不干扰剩余字符相对位置所组成的新字符串。(例如,"ACE" 是 "ABCDE" 的一个子序列,而 "AEC" 不是) 示例 1: 输入: S = "r 阅读全文
摘要:
题目描述 给定两个单词 word1 和 word2,计算出将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作: 插入一个字符 删除一个字符 替换一个字符 示例 1: 输入: word1 = "horse", word2 = "ros" 输出: 3 解释: h 阅读全文
摘要:
题目描述 Implement wildcard(通配符) pattern matching with support for**?and*(Linux命令行*.txt,通配符)。?** Matches any single character.(这里应该是非空字符)*****Matches any 阅读全文
摘要:
题目描述 Implement regular expression matching with support for**.and*。.** Matches any single character(这里的正则表达式**.应该匹配任何非空的单个字符)。*** Matches zero or more 阅读全文
摘要:
题目描述 给定一个无重复元素的有序整数数组,返回数组区间范围的汇总。 示例 1: 输入: [0,1,2,4,5,7] 输出: ["0->2","4->5","7"] 解释: 0,1,2 可组成一个连续的区间; 4,5 可组成一个连续的区间。 示例 2: 输入: [0,2,3,4,6,8,9] 输出: 阅读全文