- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 Leetcode 85. Maximal Rectangle
ProblemGiven a rows x cols binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.AlgorithmDynamic Programming (DP). The same problem as Leetcode 84.We decompose the problem into the largest rectangle,
2020-12-31 11:06:44 125
原创 Leetcode 84. Largest Rectangle in Histogram
ProblemGiven n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.AlgorithmDynamic Programming (DP). The key is to find the maximum continuous length of eac
2020-12-31 11:00:32 119 2
原创 Leetcode 83. Remove Duplicates from Sorted List
ProblemGiven a sorted linked list, delete all duplicates such that each element appear only once.AlgorithmJust delete the same numbers in the list.Codeclass Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: if not head:
2020-12-31 10:53:27 69
原创 Leetcode 82. Remove Duplicates from Sorted List II
ProblemGiven a sorted linked list, delete all duplicates such that each element appear only once.AlgorithmUse lists to save all the number and their appear times, then use the ones that only appeared once to build a new linked list.Codeclass Solution:
2020-12-31 10:50:43 122
SOFA: A Multi-Model Framework for Interactive Physical Simulation
2018-06-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人