leetcode-1691 - Maximum Height by Stacking Cuboids

動機 原來在py3要用custom cmp是這麼麻煩 ...

July 27, 2021 · 2 min · zhengcf

leetcode-733 - Flood Fill

動機 複習dfs ...

July 27, 2021 · 2 min · zhengcf

leetcode-384 - Shuffle an Array

動機 python有shuffle ...

July 27, 2021 · 2 min · zhengcf

leetcode-518 - Coin Change 2

動機 複習dp ...

July 27, 2021 · 1 min · zhengcf

leetcode-47 - Permutations II

動機 46的follow-up ...

July 27, 2021 · 1 min · zhengcf

leetcode-81 - Search in Rotated Sorted Array II

動機 這題是33的follow-up 如果多了重複怎麼辦? ...

July 27, 2021 · 2 min · zhengcf

leetcode-643 - Maximum Average Subarray I

動機 大概抓到sliding window的模式了 ...

July 27, 2021 · 1 min · zhengcf

leetcode-90 - Subsets II

動機 backtrack與重複 filter與next是不是有bug阿 ...

July 26, 2021 · 1 min · zhengcf

leetcode-118 - Pascal's Triangle

動機 水題 ...

July 25, 2021 · 1 min · zhengcf

leetcode-84 - Largest Rectangle in Histogram

動機 Monotonic Stack在pop時當下的狀態是 1 2 3 .left. 7 .right. 2 right的數字大小一定是大於7!! left的數字一定是等於7 這樣就可以形成一個閉區間,這也讓這題變成經典題 ...

July 25, 2021 · 1 min · zhengcf