Gary Lai

426. Convert Binary Search Tree to Sorted Doubly Linked List

426. Convert Binary Search Tree to Sorted Doubly Linked List

347. Top K Frequent Elements

347. Top K Frequent Elements 將頻率透過 class Solution: def topKFrequent(

701. Insert into a Binary Search Tree

701. Insert into a Binary Search Tree 如果是要在一個 BST 中插入一個點,

547. Number of Provinces

547. Number of Provinces 這個題目是有 n 個島嶼,其中島嶼可能會相連,我們要知道是不是相連的方式是題目有給定一個 n

112. Path Sum

112. Path Sum 這個題目很像是 N Sum 的題目,不過是從根節點開始,找到是不是可以從根節點到葉節點之間,所有的值加起來剛好和目標相同。

713. Subarray Product Less Than K

713. Subarray Product Less Than K 這一題很是 LeetCode 上面難度中等的題目,題目結構也很容易就可以想到是滑動窗口的題目,

1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree

1379. Find a Corresponding Node of a Binary Tree in

117. Populating Next Right Pointers in Each Node II

117. Populating Next Right Pointers in Each Node II "

12. Integer to Roman

12. Integer to Roman 直接把規則寫出來 class Solution: def intToRoman(self,

1446. Consecutive Characters

1446. Consecutive Characters class Solution: def maxPower(self, s: str)