Introduction to Algorithm-03-Greedy 读者稍后会发现,贪心算法只需考虑一个选择(即贪心的选择),在做贪心选择时,子问题之一必是空的,因此,只留下一个非空子问题。 2025-06-15 Algorithm #Algorithm #Greedy
Introduction to Algorithm-02-DP 考虑以数组中元素为结尾的最大子数组和,对于数组中的第i个元素,有两种选择: 2025-06-15 Algorithm #Algorithm #Dynamic Programming