Classic

1. 2 Sum

1. 2 Sum Two sum 最簡單的就是用窮舉法把所有的組合都列出來,時間複雜度為 \(O(n^2)

1490. Clone N-ary Tree

1490. Clone N-ary Tree 這個題目是樹,題目要考察是否可以寫出遍歷整棵樹的程式碼,類似的題目是 133. Clone Graph

4. Median of Two Sorted Arrays

4. Median of Two Sorted Arrays 這個題目直覺的解法很簡單,做法也很多種,因為題目的邏輯很簡單,就是要找到中位數。

309. Best Time to Buy and Sell Stock with Cool down

309. Best Time to Buy and Sell Stock with Cool

772. Basic Calculator III

772. Basic Calculator III 前面兩題解完,此題題目有變化,答案無變化 class Solution: def

163. Missing Ranges

163. Missing Ranges 雖然這一題 LeetCode 是標記簡單,但是細節上要想清楚我覺得難度應該有接近中等的等級,會把這一題我放在時間區間問題,是因為概念很類似 759.

673. Number of Longest Increasing Subsequence

673. Number of Longest Increasing Subsequence Prerequisite {% page-ref page="

714. Best Time to Buy and Sell Stock with Transaction Fee

714. Best Time to Buy and Sell Stock with Transaction

729. My Calendar I

729. My Calendar I 插入時間的結束時間比當前時間的開始時間小,且插入時間的開始時間比當前的結束時間小 -> 發生重疊。 class

122. Best Time to Buy and Sell Stock II

122. Best Time to Buy and Sell Stock II 這個題目是每天都可以買賣股票,