package LeetCode_64 /** * 64. Minimum Path Sum * https://leetcode.com/problems/minimum-path-sum/description/ * * Given a m x n grid filled with non-ne ...
分类:
其他好文 时间:
2020-05-13 00:38:52
阅读次数:
62
(https://leetcode cn.com/problems/number of ways of cutting a pizza/) 猛一看感觉好吓人,其实最后做出来后在感觉就那样 这题第一眼看上去就像dp,知道这题考的是dp后我们接下来就要写出状态,很明显,切的刀数算一维,接下来我们还要去表 ...
分类:
其他好文 时间:
2020-05-12 18:38:19
阅读次数:
77
```实现strStr()函数。给定一个haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。示例 1:输入: haystack = "hello", needle = "ll"输出: ... ...
分类:
其他好文 时间:
2020-05-12 15:25:28
阅读次数:
46
我的LeetCode:https://leetcode cn.com/u/ituring/ 我的LeetCode刷题源码[GitHub]:https://github.com/izhoujie/Algorithmcii LeetCode 946. 验证栈序列 题目 给定?pushed?和?poppe ...
分类:
其他好文 时间:
2020-05-12 14:04:09
阅读次数:
192
给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 设计一个算法来计算你所能获取的最大利润。你可以尽可能地完成更多的交易(多次买卖一支股票)。 注意:你不能同时参与多笔交易(你必须在再次购买前出售掉之前的股票)。 示例 1: 输入: [7,1,5,3,6,4]输出: 7解释: 在第 2 ...
分类:
其他好文 时间:
2020-05-12 09:37:26
阅读次数:
71
leetcode 4.[寻找两个有序数组的中位数] [寻找两个有序数组的中位数]: https://leetcode cn.com/problems/median of two sorted arrays/ leetcode 9.[回文数] [回文数]: https://leetcode cn.co ...
分类:
其他好文 时间:
2020-05-10 19:28:15
阅读次数:
73
题目地址:https://leetcode-cn.com/problems/er-cha-shu-de-zui-jin-gong-gong-zu-xian-lcof/ 题目描述 给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个结点 p ...
分类:
编程语言 时间:
2020-05-10 19:24:17
阅读次数:
55
leetcode 3.[无重复字符的最长子串] [无重复字符的最长子串]: https://leetcode cn.com/problems/longest substring without repeating characters/ leetcode 14.[最长公共前缀] [最长公共前缀]: ...
分类:
其他好文 时间:
2020-05-10 19:02:55
阅读次数:
55
leetcode 17.[电话号码的字母组合] [电话号码的字母组合]: https://leetcode cn.com/problems/letter combinations of a phone number/ leetcode 22.[括号生成] [括号生成]: https://leetco ...
分类:
其他好文 时间:
2020-05-10 19:01:16
阅读次数:
57
leetcode 13.[罗马数字转整数] [罗马数字转整数]: https://leetcode cn.com/problems/roman to integer/ leetcode 12.[整数转罗马数字] [整数转罗马数字]: https://leetcode cn.com/problems/ ...
分类:
其他好文 时间:
2020-05-10 18:57:07
阅读次数:
55