Leetcode题解
哥布林军团
这个作者很懒,什么都没留下…
展开
-
Leetcode 力扣动态规划笔记 部分简单题算法总结CPP
53. Maximum subarrayGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.在一个整数数组里找到和最大的部分数组并返回和。简单题。这道题不完全算动态规划,可以...原创 2020-02-04 00:24:57 · 314 阅读 · 0 评论 -
Leetcode 力扣动态规划笔记 部分中等题算法总结CPP
5. Longest Palindromic SubstringGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.给定字符串s,找出它的最长回文字符串。DP解法思路:如果有s的最长回文字符串t,那么把t的头尾去掉依...原创 2020-02-04 04:30:09 · 250 阅读 · 0 评论