Classic

4. Median of Two Sorted Arrays

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

16. 3Sum Closest

16. 3Sum Closest

516. Longest Palindromic Subsequence

516. Longest Palindromic Subsequence 這一題和 647. Palindromic Substrings 很像,只是其中的差異是一個問的是「

1490. Clone N-ary Tree

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

315. Count of Smaller Numbers After Self

315. Count of Smaller Numbers After Self class BinaryIndexedTree: def

227. Basic Calculator II

227. Basic Calculator II 放進去 stack 的數字,如果都是正、負數的話,就可以直接加總,

188. Best Time to Buy and Sell Stock IV

188. Best Time to Buy and Sell Stock IV 自頂向下

1136. Parallel Courses

1136. Parallel Courses 這個題目是 207. Course Schedule 和 210. Course

369. Plus One Linked List

369. Plus One Linked List # Definition for singly-linked list. # class

303. Range Sum Query - Immutable

303. Range Sum Query - Immutable class NumArray: def __init_