Note: The most water = width * min(left, right), where width = j - i, i and j are the indexes of two sides. We can use two pointers starting from the begging and the end of the array to solve this problem. The
NO.12 简单 (196. 删除重复的电子邮箱) leetcode-cn.com/problem # 注意是要用到DELETE操作。 DELETE p1 FROM Person p1, Person p2 WHERE p1.Email=p2.Email AND p1.Id>p2.Id NO.13 简单 (1179. 重新格式化部门表) leetcode-cn.com/problem # IF和CASE都可以,同时注意用上SUM函数。 /* select...
海量技术面试题库,拥有算法、数据结构、系统设计等 1000+题目,帮助你高效提升编程技能,轻松拿下世界 IT 名企 Dream Offer。
72. 编辑距离 - 给你两个单词 word1 和 word2, 请返回将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作: * 插入一个字符 * 删除一个字符 * 替换一个字符 示例 1: 输入:word1 = "horse", word2 = "ros" 输出:3 解释: horse
给你一个二叉树的根节点root, 检查它是否轴对称。 示例1: 输入:root = [1,2,2,3,4,4,3]输出:true 示例2: 输入:root = [1,2,2,null,3,null,3]输出:false 提示: 树中节点数目在范围[1, 1000]内 -100 <= Node.val <= 100 进阶:你可以运用递归和迭代两种方法解决这个问题吗?
53. 最大子数组和 - 给你一个整数数组 nums ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 子数组 是数组中的一个连续部分。 示例 1: 输入:nums = [-2,1,-3,4,-1,2,1,-5,4] 输出:6 解释:连续子数组 [4,-1,2,1] 的和最大,为
刷完这道题就可以试试力扣的No674.最长连续递增序列,类型基本差不多。一刷执行耗时beat 98.68% 内存...
feat: add solutions to lc problem: No.3586 (#4499) 53d1406· Jun 16, 2025 History10,949 Commits .github .husky basic images lcci lcof lcof2 lcp lcs solution .clang-format .editorconfig .gitignore .nojekyll .prettierignore ...
Leetcode No.120 三角形最小路径和(动态规划) 编程算法 每一步只能移动到下一行中相邻的结点上。相邻的结点 在这里指的是 下标 与 上一层结点下标 相同或者等于 上一层结点下标 + 1 的两个结点。也就是说,如果正位于当前行的下标 i ,那么下一步可以移动到下一行的下标 i 或 i + 1 。 week 2021/11...
Leetcode serials problem: 1136. Parallel Courses 1494. Parallel Courses II 2050. Parallel Courses III 1136. Parallel Courses You are given an integern, which indicates that there arencourses labeled from1ton. You are also given an array relations whererelations[i] = [prevCoursei, nextCoursei]...