leetcode-309 - Best Time to Buy and Sell Stock with Cooldown

動機 可以當成188的暖身題 ...

January 31, 2021 · 2 min · zhengcf

leetcode-121 - Best Time to Buy and Sell Stock

動機 經典的stock系列題目的開始 ...

January 31, 2021 · 1 min · zhengcf

leetcode-523 - Continuous Subarray Sum

動機 要與560一起看 ...

January 31, 2021 · 2 min · zhengcf

leetcode-581 - Shortest Unsorted Continuous Subarray

動機 當初想說只要看到第一個不對的點就可以了,但沒想到的是overlap與根本沒有需要的case…,所以一直出事 [1,2,3,3,3] ...

January 31, 2021 · 2 min · zhengcf

leetcode-406 - Queue Reconstruction by Height

動機 這應該是最短的leetcode code ...

January 30, 2021 · 2 min · zhengcf

leetcode-739 - Daily Temperatures

動機 現在只要用到stack就會讓我想到merge interval ...

January 30, 2021 · 1 min · zhengcf

leetcode-212 - Word Search II

動機 原來lru_cache搭配dfs可以達到判有沒有visited的效果!! ...

January 30, 2021 · 2 min · zhengcf

leetcode-239 - Sliding Window Maximum

動機 從sliding window到寫merge interval的變化版 ...

January 30, 2021 · 2 min · zhengcf

leetcode-416 - Partition Equal Subset Sum

動機 真的就是DPㄟ ...

January 30, 2021 · 1 min · zhengcf

leetcode-414 - Third Maximum Number

動機 heapq是不是比較慢啊 ...

January 30, 2021 · 1 min · zhengcf