Design

2336. Smallest Number in Infinite Set

2336. Smallest Number in Infinite Set 這個題目滿有趣的,側重在邏輯處理的部分,寫 code

1046. Last Stone Weight

1046. Last Stone Weight class Solution: def lastStoneWeight(self, stones:

703. Kth Largest Element in a Stream

703. Kth Largest Element in a Stream class KthLargest: def

707. Design Linked List

707. Design Linked List class ListNode: def __init__(self, x)

449. Serialize and Deserialize BST

449. Serialize and Deserialize BST 參考 297. Serialize and Deserialize

295. Find Median from Data Stream

295. Find Median from Data Stream 這題如果透過排序的話,就會很好做,在每次取出數值時,將記憶體中的每個數字排列好,