problem:https://leetcode.com/problems/minimum-score-triangulation-of-polygon/ 记忆化搜索。这道题主要的难点在于如何划分子问题,以某一点为基础,直接一分为二是会漏掉不少情况的;而由于边一定存在于某个三角形中,我们可以选定特定边,然后使得边对应的两个点分别在不同集合中,进行二分。 classSolution {public:...
.problemSiteData.json CONTRIBUTING.md LICENSE Neetcode-update.iml README.md README_template.md updateCompletionTable.js updateSiteData.js verifySiteData.js Breadcrumbs leetcode-solutions /rust / 0076-minimum-window-substring.rs Latest commit Cannot retrieve latest commit at this time. HistoryHistory ...
0518-Coin-Change-2 0519-Random-Flip-Matrix 0528-Random-Pick-with-Weight 0530-Minimum-Absolute-Difference-in-BST 0541-Reverse-String-II 0542-01-Matrix 0557-Reverse-Words-in-a-String-III 0559-Maximum-Depth-of-N-ary-Tree 0561-Array-Partition-I 0563-Binary-Tree-Tilt 0572-S...
My Solutions to Leetcode problems. All solutions support C++ language, some support Java and Python. Multiple solutions will be given by most problems. Enjoy:) 我的Leetcode解答。所有的问题都支持C++语言,一部分问题支持Java语言。近乎所有问题都会提供多个算