[out of order version ● sword finger offer] daily algorithm problem punch in problem solution - dynamic programming (topic No. 42,46,47,48)

Punch in day7 Question 1: Sword finger Offer 42. Maximum sum of continuous subarrays Enter an integer array. One or more consecutive integers in the array form a sub array. Find the maximum value of the sum of all subarrays. The required time complexity is O(n). Example 1: Input: num = [- 2,1, - 3,4, - 1,2,1, - 5,4] Output: 6 Explana ...

Posted by GravityFX on Fri, 17 Sep 2021 09:19:17 -0700

Beginner algorithm brush Day4

Maximum Square: the idea is to solve it by dynamic programming. Traverse all possible lengths, regard each point in the matrix as the lower right corner of the square under this length, and judge whether there is a square with this point as the lower right corner under the current length. DP[i][j] is equal to the area. The judgment condition is ...

Posted by knucklehead on Fri, 17 Sep 2021 07:55:34 -0700

The first ICPC Millet Network Election in 2020 (Resume Classics)

Introduction Team practice, not very good, there are many places can be improved, such as the answer strategy, their own check-in unexpectedly wa issued, shame. Points of knowledge involved Graph Theory, Two-Dimensional Difference, Search, Segment Tree, Number Theory, dp, Greed Links: ICPC Millet Network Selection Match 1, 2020 subject ...

Posted by sdallas411 on Tue, 14 Sep 2021 12:11:25 -0700